Its a matter of reading the directory, getting the file properties, the name etc, setting the images to a session and then creating the images, refresh on every page, if the "first" key is done, delete from array and do next, if failed add to end.
As it may seem simple at the first glance, what are you going to do if new pics are added to the directory you already processed? I would suggest that a thumbnail be generated as the files are uploaded. However, if they are added by, e.g., FTP, then I would suggest that thumbs are created in real time (imagine someone names a file mypic_thumbnail)? The thumb generator could as well employ caching to reduce traffic and load.
__________________ onPHP5.com - PHP5: Articles, News, Tutorials, Interviews, Software and more
no the generated images will be stored in a db and then compared, u dont have to worry about it just if someone could point me in the right direction wud be great...
__________________ Alexa Share <-- Trade virtual shares in websites with this online game.
codR.us <-- Submit and vote for your favorite code snippets with codR.us.
I've made a script that, whanever you look at the thumbnail page, it goes through each picture in a given directory. If there exists a thumbnail for it, it shows the thumbnail, otherwise it creates one and shows that. Fast loading except for the first time each thumb is shown.
Currently it makes all thumbnails in the same directory, named as an md5 hash of the original file for duplicates.
I don't have it handy within reasonable reaching space for this early in the morning, but message me perhaps and I'll see what I can do.