开发者

get string values from a text file (town name & postal code) and insert into URL

开发者 https://www.devze.com 2023-01-27 19:21 出处:网络
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:

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
0

精彩评论

暂无评论...
验证码 换一张
取 消