Show person's city on site?

Discussion in 'BlackHat Lounge' started by mistablackhat00, Jun 1, 2011.

  1. mistablackhat00

    mistablackhat00 Regular Member

    Joined:
    May 4, 2009
    Messages:
    309
    Likes Received:
    139
    I know there is a way to do this, I just can't find it.

    I need a code to insert in my site that will simply say the user's city. Like it takes their IP and displays their city. Nothing I have to pay for please.

    I already tried searching on here and couldn't find anything.

    Thanks
     
  2. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    975
    Likes Received:
    682
    Occupation:
    Web/Bot Developer
    • Thanks Thanks x 1
  3. mistablackhat00

    mistablackhat00 Regular Member

    Joined:
    May 4, 2009
    Messages:
    309
    Likes Received:
    139
    Looks like just what I need, thanks dude!
     
  4. ericsson

    ericsson Elite Member Premium Member

    Joined:
    Apr 25, 2009
    Messages:
    2,641
    Likes Received:
    8,137
    Or do u mean, like those adult sites has?

    Like "There are 29459 singles in "Geo-Target-City-Here" ??
     
  5. mistablackhat00

    mistablackhat00 Regular Member

    Joined:
    May 4, 2009
    Messages:
    309
    Likes Received:
    139
    That's what I mean, but I believe what MrBlue posted above should work perfectly! Unless there is an even easier way?
     
  6. BassTrackerBoats

    BassTrackerBoats Super Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    20,577
    Likes Received:
    37,850
    Occupation:
    Generic Human Being
    Location:
    As Close to Heaven as One Can Get!
    Home Page:
    I used to use this:

    <script type="text/javascript" src="http://www.google.com/jsapi"></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("Unknown location")}[FONT=&quot] </script>

    I don't know if it is still valid or not though.
    [/FONT]
     
  7. mistablackhat00

    mistablackhat00 Regular Member

    Joined:
    May 4, 2009
    Messages:
    309
    Likes Received:
    139
    That doesn't seem to being working, for me at least anyway. Thanks though!