I don't understand the post.
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.