I'm trying to get some values from a text file (town names & postal code) and paste it to an url to interogate an external website:
In the text file the values are:
"PARIS 75010"
"LILLE 59000"
...
I want to insert those values into the following url: http://fr.mappy.com/#d=Town,+postalco开发者_如何学Gode,+departement,+France&p=map
Since I have a lot of values to treat i need a simple way to do this.
Any ideas :)?
Thanks in advance
Your tags say PHP and C++, but a simple way to do this might be to use a shell script. Just read the lines from the file and then invoke the program curl
to do the HTTP GET. For example:
while read town code; do
curl "http://fr.mappy.com/#d=$town,+$code..."
done
精彩评论