Jump to content

merlin21

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by merlin21

  1. poti incerca si asta, daca ai nevoie de toate fisierele lasa un PM sau pentru ceilalti daca nu fisierele pot fi gasite si pe site'ul oficial ip2location.com , curl ia adresa in baza coordonatelor de pe googlemaps! sper sa iti foloseasca! <html dir="ltr"><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"></head> <?php require_once('IP2Location.php'); // Standard lookup with no cache $loc = new IP2Location('IP2LOCATION-LITE-DB11.BIN'); $x =$_GET['ip']; if (empty($x)){ $ip = $_SERVER['REMOTE_ADDR']; }else{ $ip = $x; } $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 & Longitude : +' . $record->latitude . ',+'. $record->longitude . '<br />'; echo 'ZIP Code: ' . $record->zipCode . '<br />'; echo 'Time Zone: ' . $record->timeZone . '<br />'; $address = '+' . $record->latitude . ',+'. $record->longitude ; $url = "http://maps.google.com/maps/api/geocode/json?address=$address&sensor=false"; $ch22 = curl_init(); curl_setopt($ch22, CURLOPT_URL, $url); curl_setopt($ch22, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch22, CURLOPT_PROXYPORT, 3128); curl_setopt($ch22, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch22, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch22); curl_close($ch22); $response_a = json_decode($response); echo 'FullAdress: ' . $response_a->results[0]->formatted_address . '<br />'; ?> </html> o sa ai nevoie de urmatoarele IP2LOCATION-LITE-DB11.BIN IP2Location.php iar un result ar arata ceva de genul IP Address: 109.96.96.175 IP Number: 1835032751 ISO Country Code: RO Country Name: ROMANIA Region Name: BUCURESTI City Name: BUCHAREST Latitude & Longitude : +44.4322509766,+26.1062602997 ZIP Code: - Time Zone: +03:00 FullAdress: Calea Mo?ilor, Bucharest, Romania
  2. se pare ca link'ul nu mai exista!
×
×
  • Create New...