Click to See Complete Forum and Search --> : PHP - Converting IP to Country


cancer10
05-10-2007, 11:00 PM
PHP - Converting IP to Country

Hello,

Is there any function/pre-made scripts in php which can tell me the name of country based on IP?


For example: If I supply an IP 132.162.138.139 then the script would echo "India"

Thanx in advance :)

Lubox
05-11-2007, 01:34 AM
Indeed. Try geoIP from Maxmind (http://www.maxmind.com). I'm using their city and country database and I pay 90 usd each month, but I believe they have a free country database which is not that acccurate. They even have made the PHP scripts for you (you only need a wrapper).

Lubox