Page 1 of 1

Need to get IP geographic location!

Posted: Thu May 19, 2005 10:42 am
by rustamabd
Is there a PHP package for this? I need to be able to query arin and ripe from a PHP page.
TIA
- Russ -

Posted: Thu May 19, 2005 10:45 am
by malcolmboston
one preferably without the user of pear please :)

seriously, i can think of a 1001 reasons i would use this

Posted: Thu May 19, 2005 11:39 am
by phpScott
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

Posted: Fri May 20, 2005 2:16 pm
by rustamabd
I could just parse the whois results from ARIN and RIPE in my php page...
Does anyone know if there are any flood limitations on whois.arin.net and whois.ripe.net?

Posted: Fri May 20, 2005 2:52 pm
by onion2k
http://www.maxmind.com/app/php

Try the Pure PHP version.

Posted: Fri May 20, 2005 2:59 pm
by timvw

Posted: Fri May 20, 2005 3:46 pm
by onion2k
Last time I looked I was sitting in my office on the south coast of the UK, but now I'm in the sea just to the west of Africa.

Strange.

Posted: Fri May 20, 2005 5:24 pm
by timvw
I know, it's time i update my geoip.dat file :)
And the positioning on the map may need some tweaking too.


They are already on my TO-DO list..

Posted: Fri May 20, 2005 8:09 pm
by infolock
man, that looks sweet!

Posted: Fri May 20, 2005 8:22 pm
by Burrito
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?

Posted: Fri May 20, 2005 11:23 pm
by anjanesh
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&section=2 - Dont know abt this.

Posted: Sat May 21, 2005 12:43 am
by timvw
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)