Re: Re: ip to country

From: Date: Sun, 21 Mar 2004 00:05:41 +0000
Subject: Re: Re: ip to country
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-181056@lists.php.net to get a copy of this message
On Mar 21, 2004, at 1:01 AM, Marek Kilimajer wrote:
Manuel Lemos wrote:
On 03/20/2004 06:48 PM, Enda Nagle wrote:
I have a site that will have different pricing by world region / country and also offer different currencies. Presently, the user has to select their country from a select menu and submit the form, but I would like to eliminate this step if possible, and set the country according to their IP address. I had a quick look at http://www.iptocountry.com but was wondering if there was a way of doing this with PHP functions? I know its in use on the php.net and google.com sites (when I go to either I get ie.php.net or google.ie) so was wondering if its costly / easy to implement?
You may also want to try this NetGeo interface class. http://www.phpclasses.org/netgeoclass
You can use this class but remember that these services limit the number of requests per ip address. php.net and google certainly don't use the free service but instead bought a database. If your site is busy you should buy one too.
PHP.net uses a free database: http://ip-to-country.webhosting.info/ which is actually quite good. Regards, Filip de Waard

« previous php.general (#181056) next »