Advertisement
avcipsids

Untitled

Jan 24th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id="yourinfo"></div>
  2. <script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAp04yNttlQq-7b4aZI_jL5hQYPm-xtd00hTQOC0OXpAMO40FHAxQMnH50uBbWoKVHwgpklyirDEregg"></script>
  3. <script type="text/javascript">
  4. if(google.loader.ClientLocation)
  5. {
  6. visitor_lat = google.loader.ClientLocation.latitude;
  7. visitor_lon = google.loader.ClientLocation.longitude;
  8. visitor_city = google.loader.ClientLocation.address.city;
  9. visitor_region = google.loader.ClientLocation.address.region;
  10. visitor_country = google.loader.ClientLocation.address.country;
  11. visitor_countrycode = google.loader.ClientLocation.address.country_code;
  12. document.getElementById('yourinfo').innerHTML = '<p>Lat/Lon: ' + visitor_lat + ' / ' + visitor_lon + '</p><p>Location: ' + visitor_city + ', ' + visitor_region + ', ' + visitor_country + ' (' + visitor_countrycode + ')</p>';
  13. }
  14. else
  15. {
  16. document.getElementById('yourinfo').innerHTML = '<p>Whoops!</p>';
  17. }
  18. </script>
  19.  
  20. http://services.ipaddresslabs.com/iplocation/locateip?key=SAK58RWP983694534K4Z&ip=".$ClientIP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement