1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Geo location script/DB ?

Discussion in 'General Scripting Chat' started by grinding, Jan 15, 2010.

  1. grinding

    grinding Registered Member

    Joined:
    Oct 27, 2009
    Messages:
    62
    Likes Received:
    72
    Occupation:
    I'd rather be snorting cocaine off a hooker's ass
    Location:
    City of Angels
    Anyone know of a good geo location script which returns city based on IP?

    I used to use the google location api which, when it works, works great, but many times it just returns an empty value. Anyway, if anyone wants it, here it is

    Code:
    <script src="http://www.google.com/jsapi" 
    
    type="text/javascript"></script><script type="text/javascript"><!--
    if (typeof(google.loader.ClientLocation.address.city) != null) {
      document.write(google.loader.ClientLocation.address.city
      +", "
      +google.loader.ClientLocation.address.region);
    } else {
      document.write("Walnut Creek, CA")
    }
    // --></script>
    
     
  2. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Hit the search button dude - there are a few on here.
    Think I replied to someones thread with a script to use....works for city as well.