Jump to content

junejune

Members
  • Posts

    7
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

junejune's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The latest CSV now comes with both IPv4 and IPv6 and the IPv4 is embedded as IPv4-mapped IPv6 addresses. So querying IPv4, you need to convert the IP to IPv4-mapped IPv6.
  2. IP2Location PHP module supports IPv6 queries now. <?php require_once('IP2Location.php'); // Standard lookup with no cache $loc = new IP2Location('databases/DB24.BIN'); /* Cache whole database into system memory and share among other scripts & websites WARNING: Please make sure your system have sufficient RAM to enable this feature */ //$loc = new IP2Location('databases/DB24.BIN', IP2Location::SHARED_MEMORY); /* Cache the database into memory to accelerate lookup speed WARNING: Please make sure your system have sufficient RAM to enable this feature */ //$loc = new IP2Location(ROOT . 'databases/DB24.BIN', IP2Location::MEMORY_CACHE); $ip = $_SERVER['REMOTE_ADDR']; $record = $loc->lookup($ip, IP2Location::ALL); echo 'IP Address: ' . $record->ipAddress . '<br />'; echo 'IP Number: ' . $record->ipNumber . '<br />'; echo 'ISO Country Code: ' . $record->countryCode . '<br />'; echo 'Country Name: ' . $record->countryName . '<br />'; echo 'Region Name: ' . $record->regionName . '<br />'; echo 'City Name: ' . $record->cityName . '<br />'; echo 'Latitude: ' . $record->latitude . '<br />'; echo 'Longitude: ' . $record->longitude . '<br />'; echo 'ZIP Code: ' . $record->zipCode . '<br />'; echo 'Time Zone: ' . $record->timeZone . '<br />'; echo 'ISP Name: ' . $record->isp . '<br />'; echo 'Domain Name: ' . $record->domainName . '<br />'; echo 'Net Speed: ' . $record->netSpeed . '<br />'; echo 'IDD Code: ' . $record->iddCode . '<br />'; echo 'Area Code: ' . $record->areaCode . '<br />'; echo 'Weather Station Code: ' . $record->weatherStationCode . '<br />'; echo 'Weather Station Name: ' . $record->weatherStationName . '<br />'; echo 'MCC: ' . $record->mcc . '<br />'; echo 'MNC: ' . $record->mnc . '<br />'; echo 'Mobile Carrier Name: ' . $record->mobileCarrierName . '<br />'; echo 'Elevation: ' . $record->elevation . '<br />'; echo 'Usage Type: ' . $record->usageType . '<br />'; ?>
  3. What is the IP address? If the lat/long is incorrect you can try to contact the provider see if they can update it. You can check your location at IP2Location.com too.
  4. Hi all, thanks for the replies, I am trying with another easy solution after reading all of the clues. Will be back once I solve my problem.
  5. Hi, I am building an application in my page where I need to add geolocation functionality and I need the visitors zip code in return, like say within 100miles. I have some sample source code but returning only Country, States and City. Could anyone please help? Any input is greatly appreciated.
  6. Maybe you can try http://locasnap.com but I am not sure if they have any free APIs or scripts for this. They allows snapshot from different locations as well.
  7. You can check out the GeoLocation databases from http://www.IP2Location.com or you can use a free web service like the ones from http://www.FraudLabs.com to get the latitude and longitude.
×
×
  • 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.