Script to get City Lat - Log, City Name, Country, etc.
Hi:
I need a cript that could pass a IP list through: http://www.geobytes.com/IpLocator.htm?GetLocation and get some data like: Lat - Lon City Country Population The most important are: Lat, Log, City and Country. The question is, IF this is possible to make such a script that could pass the IPs and grab those variables??? TIa :study: :rolleyes: |
try something like this :
#!/bin/bash while read LINE do wget http://www.geobytes.com/IpLocator.ht...ion&ipaddress=$LINE | <grep out the variables> done this will read IP-adresses from STDIN, one per line Greets, Frank |
Hi fvgestel:
Thanks. I am not a programmer altough I have used some bash scirpts before, could you be a little more specific? I have doubt regarding the INPUT and the OUTPUT part. What is STDIN? TIA :) |
STDIN is standard input. Could be your terminal, could be a file with IP-adresses. eg :
cat <filename> | yourscript.sh If you run the script without the cat command and pipe, the script will wait for you to type in IP-adresses from the terminal Greets, Frank |
Hmmm:
No luck here, any other reco or an alternative maybe using Lynx with the script?? After researching, I found that quesrys are limited at 20 per hour. So the script have to follow this restriction.... Thanks :( |
Yes, you could also use lynx, using the -dump option
so : lynx -dump http://www.geobytes.com/IpLocator.ht...ion&ipaddress=$LINE |
All times are GMT -5. The time now is 08:05 AM. |