Patrick wrote:
>> Hi Everyone
>> Could anyone give me some advice on the best way to do IP to
>> geo-location with php using open source code?
>> Thanks in advance-Patrick

That is not an easy problem.

You can go to ARIN, APNIC, etc and get /8 and smaller assignments.
But, if the new assignee hasn't SWIP'd their blocks, the world
will think the old assignment is still true. Recently a block was
assigned to a US company and their customers couldn't access because there hadn't been a SWIP. hulu denied access
because the block is still in the whois records as non-US.

The big geolocation companies make a lot of mistakes.
Because - they will not use a fine enough granularity to sort
out where an ip connection is coming from. They'll usually stop
at the last router within a large transit provider's block.
For example: many local ISPs in northern california will
all appear to be in stockton, etc. where some tier 1 routers are.

For dynamic ip ranges it is even messier.

For now, ip geolocation is very fuzzy. Much better to go by
zip code or postal code. At least  when zip areas are merged
or changed you might get sufficient advance notice.

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to