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

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:
    308
    Likes Received:
    135
    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:
    974
    Likes Received:
    680
    Occupation:
    Web/Bot Developer
    • Thanks Thanks x 1
  3. mistablackhat00

    mistablackhat00 Regular Member

    Joined:
    May 4, 2009
    Messages:
    308
    Likes Received:
    135
    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,138
    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:
    308
    Likes Received:
    135
    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

    Joined:
    Mar 10, 2010
    Messages:
    17,289
    Likes Received:
    31,743
    Occupation:
    Selling CPA Sites
    Location:
    Not England
    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:
    308
    Likes Received:
    135
    That doesn't seem to being working, for me at least anyway. Thanks though!