Need to get IP geographic location!
Moderator: General Moderators
Need to get IP geographic location!
Is there a PHP package for this? I need to be able to query arin and ripe from a PHP page.
TIA
- Russ -
TIA
- Russ -
-
malcolmboston
- DevNet Resident
- Posts: 1826
- Joined: Tue Nov 18, 2003 1:09 pm
- Location: Middlesbrough, UK
don't know how it works as I haven't checked it out yet but I remebered this thread so I though I would post the link
http://www.phpbuilder.com/snippet/detai ... pet&id=291
http://www.phpbuilder.com/snippet/detai ... pet&id=291
A live sample of what you can do with it
)
http://timvw.madoka.be/ip2location/
and source http://timvw.madoka.be/programming/php/ip2location.txt
http://timvw.madoka.be/ip2location/
and source http://timvw.madoka.be/programming/php/ip2location.txt
indeed, that is very nice I've only ever used this one:
http://www.antionline.com/tools-and-toys/ip-locate/
and I've always wondered how it was done, do you just have a db with a set of ips Tim?
http://www.antionline.com/tools-and-toys/ip-locate/
and I've always wondered how it was done, do you just have a db with a set of ips Tim?
antionline returned for my IP
xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) is located in Milton, New South Wales (state), Australia.
when it should have returned India !
1. Get the contents of http://whois.sc/xxx.xxx.xxx.xxxx and parse the data.
2. http://www.phpclasses.org/browse/package/2099.html - Works but need to make changes - I guess that was meant for an older version of PHP 5 ?
3. http://www.e-riding.com/whereisthatip/ - small SOAP API (PHP5)
4. http://ip-to-country.webhosting.info/ - You have to keep updating the db every month
5. http://www.phptricks.com/?lesson_id=23§ion=2 - Dont know abt this.
xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx) is located in Milton, New South Wales (state), Australia.
when it should have returned India !
1. Get the contents of http://whois.sc/xxx.xxx.xxx.xxxx and parse the data.
2. http://www.phpclasses.org/browse/package/2099.html - Works but need to make changes - I guess that was meant for an older version of PHP 5 ?
3. http://www.e-riding.com/whereisthatip/ - small SOAP API (PHP5)
4. http://ip-to-country.webhosting.info/ - You have to keep updating the db every month
5. http://www.phptricks.com/?lesson_id=23§ion=2 - Dont know abt this.
I got a copy once of http://www.maxmind.com/app/city because i was doing a localized banner scripts.. (But i've noticed that if you google for GeoIPCity.dat you might be able to find a "free" version :p)