hopefully someone here will find the answer to this:
Im looking to have a php code that will generate virtual pages for each city in USA, there are about 32,000 cities so to manually create those pages is nearly impossible, that’s why I need a script that will create page virtually for example what I mean take a look here :
http://www.tvbydirect.com/directv-deal/
as you can see in the bottom page there are all the states and then when you click there are all the cities in that state, now notice that the page stays the same (header, contact form, footer) but the content is the same just the city name is changed, also in the meta tags.
what line of code, or script can/will do that ?
PHP acts as a dynamic web framework, there would be need to create static pages, as they can be within the dynamic form.
What you should do is generate a database with the required information and then use PHP To display different data depending on the environment its being called from.
For example, if you had the following web adress:
yo uwould then use the 2 variables
usaandwashingtonand then check the database for the required information.And then the information returned from the database would be printed in a custom template.