New IP addresses geolocation tools and database

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
marchost
Forum Newbie
Posts: 4
Joined: Wed Feb 11, 2009 7:59 pm

New IP addresses geolocation tools and database

Post by marchost »

-MySQL database of world IP addresses with geolocation that can be used with PHP
-HTTP IP address geolocation API
-Full list of IP from specific countries


http://blogama.org/node/58
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: New IP addresses geolocation tools and database

Post by josh »

What makes this different then the 100s of other services that do the same thing? If your entire database is calculated from a formula why not make it a function instead of requiring people to download a 1million+ record database?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: New IP addresses geolocation tools and database

Post by VladSun »

josh wrote:If your entire database is calculated from a formula why not make it a function instead of requiring people to download a 1million+ record database?
Did you read it?
They are just searching by network subnet, not by IP:
whois 68.142.196.63

OrgName: Inktomi Corporation
OrgID: INKT
Address: 701 First Ave
City: Sunnyvale
StateProv: CA
PostalCode: 94089
Country: US

NetRange: 68.142.192.0 - 68.142.255.255
CIDR: 68.142.192.0/18

...
There are 10 types of people in this world, those who understand binary and those who don't
marchost
Forum Newbie
Posts: 4
Joined: Wed Feb 11, 2009 7:59 pm

Re: New IP addresses geolocation tools and database

Post by marchost »

Of course there is +100 site offering ip geolocation BUT whats different here :

1)IP CIDR by country like 4.0.0.0/8 -> US (only 60 thousand possibility instead of 12 millions if you go by IP)

2)Not all IP are listed in the database. Only 10% of actual IP address, they are groupe in subnet like the previous guy said but you get a result for ANY ip.

3)API to generate BY COUNTRY blocklist or whatever you might think of

4)The full database source is available either for city or country precision.
Last edited by marchost on Thu Feb 12, 2009 9:07 am, edited 1 time in total.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: New IP addresses geolocation tools and database

Post by josh »

VladSun wrote: Did you read it?
They are just searching by network subnet, not by IP:
The subnet is a subset of the IP. He said he's using a formula to calculate the database.
marchost
Forum Newbie
Posts: 4
Joined: Wed Feb 11, 2009 7:59 pm

Re: New IP addresses geolocation tools and database

Post by marchost »

I get data for ALL IP.

If I see that 123.123.123.X to 123.123.199.X is located at the same place, I only store it once for obvious reasons.
marchost
Forum Newbie
Posts: 4
Joined: Wed Feb 11, 2009 7:59 pm

Re: New IP addresses geolocation tools and database

Post by marchost »

There is 2 different table in the database :

ip_group_city -> city precision, around 1.2million IP

ip_group_country -> country precision, around 60 thousand subnet

For country based example with Afganistan and Argentina, goto (view source if they all appear on the same line) :

http://blogama.org/country_query.php?country=AF,AR
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: New IP addresses geolocation tools and database

Post by josh »

Sorry I misread, the formula is for hashing the IPs.
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: New IP addresses geolocation tools and database

Post by VladSun »

josh wrote:
VladSun wrote: Did you read it?
They are just searching by network subnet, not by IP:
The subnet is a subset of the IP. He said he's using a formula to calculate the database.
Most people use "IP" for "IP address" not for "IP protocol". Also, the topic suggests it ...
So, IP is an element of a IP set called "subnet".
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: New IP addresses geolocation tools and database

Post by VladSun »

josh wrote:Sorry I misread, the formula is for hashing the IPs.
This is the normal, machine presentation of the IP. (PHP functions: ip2long(), long2ip() )
The format XXX.XXX.XXX.XXX is for humans.

No hashing involved here - hashing suggests there will be possible collisions, but you can't find even a single possibility here ;)
Last edited by VladSun on Thu Feb 12, 2009 1:03 pm, edited 1 time in total.
There are 10 types of people in this world, those who understand binary and those who don't
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: New IP addresses geolocation tools and database

Post by VladSun »

josh wrote:What makes this different then the 100s of other services that do the same thing?
I really can't understand your criticism in this thread - the more providers of this service we have, the better choice we will have.

@marchost

Congratulations! Keep the service running and free :)
Best regards, Vladimir.
There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: New IP addresses geolocation tools and database

Post by josh »

I said I misread it, what more you want me to say? And I was debating pointing it out but:

"Hash functions are related to (and often confused with) checksums, check digits, fingerprints, randomizing functions, error correcting codes, and cryptographic hash functions. Although these concepts overlap to some extent, each has its own uses and requirements. "
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: New IP addresses geolocation tools and database

Post by VladSun »

Did I debate your "Sorry I misread it" part of you post - I really don't think so!
I don't want our discussions to become personal battles. If you reread my posts in this thread you will see that I was trying to be objective...

For hashing:
a set of all possible values for a hash (it doesn't depend on what it is used for) is always smaller (and usually limited) than the set of all posible values to be hashed. That's why collisions are to be possible and expected.
There are 10 types of people in this world, those who understand binary and those who don't
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: New IP addresses geolocation tools and database

Post by josh »

Thatd be a checksum I believe, does it matter though?
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: New IP addresses geolocation tools and database

Post by VladSun »

http://en.wikipedia.org/wiki/Hash_function
A hash function is any well-defined procedure or mathematical function which converts a large, possibly variable-sized amount of data into a small datum, usually a single integer that may serve as an index into an array. The values returned by a hash function are called hash values, hash codes, hash sums, or simply hashes.
http://en.wikipedia.org/wiki/Checksum
A checksum or hash sum is a fixed-size datum computed from an arbitrary block of digital data
http://en.wikipedia.org/wiki/Fingerprint_(computing)
In computer science, a fingerprinting algorithm is a procedure that maps an arbitrarily large data item (such as a computer file) to a much shorter bit string, its fingerprint, that uniquely identifies the original data for all practical purposes
...

I just pointed out that ip2long() is not a hash function. For every X argument it produces a Y value and there are no two or more values of X that will produce the same value of Y - so, no collisions.

I even don't know where this "hash" word came from in this topic.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply