Hi
I have a list of cities over 6,000 population in the U.S., for example in California there are 549 cities in the list.
I wrote a script that grabs an xml file and outputs rss 2.0, and I want to plug in a different city name each time the script is run. The script will be run every 1/2 hour, so for each state, every so many days it will start over at the beginning of the list of cities.
What is the simplest way for php to do this? I can put the list in mysql, or in a php file, or in a text file, whatever.
One thought would be to put it in mysql, and put today's date in a date field for all the entries to start with. Then when the script is run, select the oldest entry (limit 1), use that city name in my output and write the current date to mysql when finished. But that seems complicated
Any thoughts will be appreciated.
Thanks
Mike
I have a list of cities over 6,000 population in the U.S., for example in California there are 549 cities in the list.
I wrote a script that grabs an xml file and outputs rss 2.0, and I want to plug in a different city name each time the script is run. The script will be run every 1/2 hour, so for each state, every so many days it will start over at the beginning of the list of cities.
What is the simplest way for php to do this? I can put the list in mysql, or in a php file, or in a text file, whatever.
One thought would be to put it in mysql, and put today's date in a date field for all the entries to start with. Then when the script is run, select the oldest entry (limit 1), use that city name in my output and write the current date to mysql when finished. But that seems complicated
Any thoughts will be appreciated.
Thanks
Mike