Free IP Locator API - Convert IP Addresses to Zip Codes with PHP

If you just want a free site to use:
IP Address Locator with Map

If you want a quick PHP solution, try this:

$ip = '';

If you want quick responses, you can install the freegeoip server on ubuntu. This will give you your own personal IP locator service to use privately (or publicly if you are a nice guy):

Install golang 1.1.1

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:duh/golang
sudo apt-get update
sudo apt-get install golang
go version

Set your go environment variables

export GOROOT=/usr/lib/go

Install freegeoip

git clone
cd freegeoip
go build

Download the database

cd db
file ipdb.sqlite

Run it

cd ..

cron script to keep the server running (replace $FREEGEOIP_PATH)

ps cax | grep -v grep | grep freegeoip > /dev/null
echo "${result}"
if [ "${result}" -eq "0" ] ; then
        echo "freegeoip is already running" #>>/home/work/cgcron
        cd $FREEGEOIP_PATH
        ./freegeoip &

cron script to update the database regularly (replace $FREEGEOIP_PATH)

./updatedb &


  1. This comment has been removed by the author.

    1. That site is terrible. It says I live in Virginia. Please use the site in my post for more accurate IP locating.

  2. Nice blog useful for those who are looking for some codes or sites to trace the location of any ip address ...I usually trace the location of an ip address just by doing whois search for that ip address through sites like here they will display details like ip location ,country ,ISP address ,name and so on but i can't trace exact home address of any person from ip address only the isp details can be found from ip address ...

  3. Find IP address location. Enter an IP address and detect city, state, country and more. IP Address Locator service is free of use.

  4. This IP address is the sole identifying factor of a computer's Internet activity. hide your IP address

  5. Hello, I will Provied SEO Niche Blog Comment Service . All comment relevant with your blog. I know every tips of niche blog comment . This service bring you lots of traffic . We Just say the post be real. That showing your personality is much more important than showing off your knowledge in the niche.

  6. For example if two organizations join and give new email addresses to their staffs, the auxiliary addresses can be utilized for workers to get messages at both their new and old email addresses. myip location

  7. In the correct hands, an IP area database can be utilized to produce great and precise outcomes. Windows USA Arkansas

  8. Numerous individuals worried about quick associations may then ask "how quick can a VPN go?" The least difficult answer is that; a VPN can go as quick as different sorts of association and can be quicker if there is quick web association at the two closures of the system. how to do a dns flush