RE: [PHP] IP to City detection

2007-03-23 Thread William Lovaton
Hi,

Thanks to all of you who helped me out.  I think this one is the best
option for now, it even has an API for PHP 4 and another one for PHP 5.

PHP 4: http://www.maxmind.com/download/geoip/api/php/
PHP 5: http://pear.php.net/package/Net_GeoIP/

Cheers,


-William



El mié, 21-03-2007 a las 14:53 +0200, Hidayet Dogan escribió:
> There's a MaxMind's GeoLite City service for that. It's free.
> 
> http://www.maxmind.com/app/geolitecity
> 
> On Wed, 21 Mar 2007, Jim Moseby wrote:
> 
> >> Hi people,
> >>
> >> Is there a way to detect the city of a person based on the IP
> >> address? I
> >> mean something like ip2nation http://www.ip2nation.com/ but for cities
> >> so I can use it in my PHP web application.
> >>
> >> Thanks for any help you can give me,
> >>
> >> -William
> >>
> >
> >
> > I have one that 'sort of' works.  It might be a start for you.  I don't take
> > credit for it, but I can't find in the source code any credits.  I'll send
> > it to you off list.
> >
> > JM
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] IP to City detection

2007-03-21 Thread Satyam
It is very hard to get to the level of city. It is the way the networks are 
built.  I live in a minor town.  My provider has a node in this city, but it 
gathers all the traffic of the whole area (my town and neighboring towns) 
and sends it through an internal link to their major regional center. 
Depending on availability, my traffic might get to the  Internet (uppercase 
Internet, the big, public, global one which links us all together) right 
through that regional node or, depending on traffic, it might get beamed 
over somewhere else and get into the Internet at another less busy node. 
Big providers are constantly shufling traffic around depending on the 
availabilty of their own internal network and that of their wholesale 
provider.   The IP you see exposed to the Internet is that of the node where 
your provider internal network connects to the public network, the uppercase 
Internet.  Due to national regulations, it is usually hard for one national 
provider to use IP addresses belonging to another country so, IP to country 
tables are quite reliable.   IP to city is not reliable at all, there is not 
external rules imposing arbitrary borders on traffic so a provider is free 
to send packets wherever it becomes more efficient.  Moreover, if a client 
has the same provider as your service, the IP address you receive might be 
an internal IP address and not an actual Interner address.  Internal IP 
addresses have little restrictions, they can be almost anything.  If that 
were the case, all bets are off.


These days with the CeBit show running at Frankfurt, Deutsch Telekom (sorry 
about the spelling) might be struggling with their bandwith around that 
area.  Data packets might be popping about everywhere in Germany and, if 
they have agreements with neighboring countries, some might be showing up at 
Denmark, Austria or Poland, who knows!  My town is close to Barcelona, 
Spain.  When they had the 3G mobile phone conference there last month, my 
packets might be going to Tarragona, Valencia or even all the way to Madrid.


Comercial IP to location databases, at least, keep in close contact with the 
major providers so they have a close idea of how are they routing their 
packets.  Non-comercial databases don't have the resoorces to keep updated. 
The only reason they are more or less reliable at the IP to country level is 
that governments have different regulations in each country and they know 
there is value in the information flowing through the optical fibers so, 
while they figure out how to tax those bits and bytes, they make it just a 
little more hard for them to flow from one country to the next, but within a 
single country, there are no limits.


Satyam



- Original Message - 
From: "William Lovaton" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, March 21, 2007 1:24 PM
Subject: [PHP] IP to City detection



Hi people,

Is there a way to detect the city of a person based on the IP address? I
mean something like ip2nation http://www.ip2nation.com/ but for cities
so I can use it in my PHP web application.

Thanks for any help you can give me,

-William

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.15/728 - Release Date: 
20/03/2007 8:07





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] IP to City detection

2007-03-21 Thread Jim Moseby
PHP] IP to City detection
> 
> 
> There's a MaxMind's GeoLite City service for that. It's free.
> 
> http://www.maxmind.com/app/geolitecity
> 


That is probably a better alternative than the one I sent, which relies on
data from api.hostip.info.

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] IP to City detection

2007-03-21 Thread Hidayet Dogan

There's a MaxMind's GeoLite City service for that. It's free.

http://www.maxmind.com/app/geolitecity

On Wed, 21 Mar 2007, Jim Moseby wrote:


Hi people,

Is there a way to detect the city of a person based on the IP
address? I
mean something like ip2nation http://www.ip2nation.com/ but for cities
so I can use it in my PHP web application.

Thanks for any help you can give me,

-William




I have one that 'sort of' works.  It might be a start for you.  I don't take
credit for it, but I can't find in the source code any credits.  I'll send
it to you off list.

JM

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] IP to City detection

2007-03-21 Thread Jim Moseby
> Hi people,
> 
> Is there a way to detect the city of a person based on the IP 
> address? I
> mean something like ip2nation http://www.ip2nation.com/ but for cities
> so I can use it in my PHP web application.
> 
> Thanks for any help you can give me,
> 
> -William
> 


I have one that 'sort of' works.  It might be a start for you.  I don't take
credit for it, but I can't find in the source code any credits.  I'll send
it to you off list.

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php