|All requests||>||Value of latitude and longitude||>||Request new recommendation||>||Featured requests||>||No recommendations|
by ms - 5 years ago (2016-07-04)
please give me an example in php script that can view latitude and longitude when we click my location ..and we can save to a DataBase TQ
This class can be used to get geographic location of a given IP address.
It sends a request to a Web server of ipinfo.io to retrieve details about a given IP address.
Currently it can obtain geographic details about the location of the computer with the IP address, such as: country code, region, city, postal code, latitude, longitude, hostname and organization and a static map from google staticmap.it supports PHP 4 and >.
I use a class call 'ip2location_lite' in my SalatReminder Class, it will return the longitude and latitude values that you're looking for plus some other information based on the ip address or hostname you provide. take a look at the 'salatcast.class.php' file in the '__construct()' function to see how I used the class in 'ip2locationlite.class.php'.
You should check out their site; there is a link to IP2Location on the main page of PHPclasses in the innovation award prizes section; then on that page look at the Free Database section near the bottom of the page.
Hopefully this will help you out.