I have kind of a weird request. I have a web site for a client that wants to list about 10k links to images. However, I am looking for an efficient way to write a script hopefully to auto create all these pages with the associated images. Put simply, a script to auto generate the thumbnail page.
To give you some sort of visual, here is the type of page it will be:
So basically if you clicked P1, it would link to a page with a thumbnail of a picture. The user would then hit the back button on their browser to back out of it, hopefully not leaving potentially 10k pages on the server.
I am not sure if php is the best way to do this, but I figured I'd give it a ****. Thanks in advance.
What are the P1, P2, P3 pages? Do each one of those pages have a large number of thumbnails on each one?
What is the purpose for the website?
And who is hosting or storing all of the images?
I'm guessing that you're going to need a database, and that you're not thinking about this in the correct way. But elaborate on what the website is supposed to do. You don't need a website with "pages". PHP scripting can render everything to the user's browser by using a database of some kind.
The website is for a company that does digital imaging. The website is being hosted on site, with ~2TB of storage, could be upped to more if necessary.
The site in question is viewable to a customer. The customer will be able to search images using a built in search function. So if they look for a certain newspaper, or image from a newspaper, that image should come up. Think of the getting results as so: Search/link/thumbnail page/picture
So each page, (P1, P2, P3 - Px) should be a link, and when a user clicks that link, it opens to page that shows a thumbnail of a picture. So just 1 thumbnail to 1 link.
A database may be the correct answer for this. I thought you could just have a script that when a user clicks the link, a page is created, associated with the page's thumbnail.
This statement, you said:
"when a user clicks the link, a page is created, associated with the page's thumbnail"
That is what a database is for. A database (or catalog) of all images that can be searched. A PHP script then creates the "page" for the user ... it's not really a web page.
This forum you are using now has no web "pages". Every "page" you see is the result of a PHP script that renders it to your browser.
I have another thought ...
What if each photo (or picture) has a descriptive filename that could be used for a search.
Example of some filenames:
2010-02-04_House_Fire_Kills_4_Section_A3_Col_2-3.jpg
2008-11-30_Senate_Meeting_Turns_to_Riot_Section_C4_Col_5.jpg
You would not really need a database ... just a PHP script to search for any filenames that have the target search word, or similar words. But if the images and filenames already exist, you can hardly rename everything.
And there are no pages ... just a search box.
A database of course would be best (like MySQL). It has some powerful query features that would be better for a comprehensive system.