top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to get the location detail of a IP Address in Java or PHP?

+3 votes

Any opensource code would be a great help :)

posted May 2, 2015 by Salil Agrawal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

We can use Geoplugin API.

Geoplugin is a webservice which allows you to find Location based upon the IP of the client. It shows City, region, country, latitude , longitude etc of the IP address.

We can integrate running website, using following code:

echo var_export(unserialize(file_get_contents(''.$_SERVER['REMOTE_ADDR'])));
answer May 2, 2015 by Amit Kumar Pandey
Thanks let me give a try
Similar Questions
+1 vote

I want a JAVA program. That gets the website name from the user and prints the IP Address of that website.

+1 vote
0 votes

Is there a way to extract out of some environmental variable the Geo location of the user being the city the user visits out website from? Perhaps by utilizing his originated ip address?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.