Jump to content

PHP IP Lookup and Detect State


zipperdeaf

Recommended Posts

There is also the IP2Country database. usually in the form of a text file that you can parse through and figure out where someone is based on a algorithim of their IP.

 

Just google for IP2Country and there should be examples of that too, else I can find the script I use.

check out

http://www.maxmind.com/

they have a free version of their service that you can put in a mysql database to lookup the ip. the free service is updated once a month. I am about to do the same thing for my site so i can show info customized for their state

thanks for the link. much easier than the custom database solution. I dont know what I would do without the great online communities here.  :)

damn i saw that they pop up an ad. or you can pay 10 a month for 10000 requests. Guess I will be using the maxmind solution. Has anybody here used it?

  • 4 years later...

Maxmind database is the most up-to-date ip database. What is more important is that they are not using mysql to store the results. This is great because querying the mysql database so many times will slow down your request rate. Also dealing with so heavy databases is hard. With maxmind you have only to download a file and include a file which contains classes to get the data.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.