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 Jr. VIP Jr. VIP Premium 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:
    950
    Likes Received:
    662
    Occupation:
    Web/Bot Developer
    • Thanks Thanks x 1
  3. mistablackhat00

    mistablackhat00 Jr. VIP Jr. VIP Premium 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,642
    Likes Received:
    8,132
    Occupation:
    www
    Location:
    Swe
    Home Page:
    Or do u mean, like those adult sites has?

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

    mistablackhat00 Jr. VIP Jr. VIP Premium 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 Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    12,741
    Likes Received:
    21,953
    Occupation:
    I don't actually have a job
    Location:
    It's an Algo, of course it can be gamed.
    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 Jr. VIP Jr. VIP Premium Member

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