SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Location
    Texas, USA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Visitor Identification

    I've noticed some Web sites have the capability of automatically identifying visitors. For example, I click on a link to a dating or travel site and I see that the site can tell what city I live in, because it advertises singles in my area (dating sites) or flights from my city (travel sites). All I did was click a link. I didn't fill in any information about myself. How is this done? Is it through JavaScript? Can I do it on my Web site?

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can purchase lists of IP addresses which match them to country/city locations - the site will have just done a lookup against your IP address.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Location
    Texas, USA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile How do you implement this?

    How do you program the site to do this? Is it done through JavaScript? Are cookies involved? Can anyone direct me to where I might be able to find the right coding to implement this? Thanks.

  4. #4
    I ♥ PHP
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Sonyk,

    This would be done using a server side language such as PHP. When the page is loaded the script would retrieve the users IP address and check it against a database. The database table would contain a list of locations for IP addresses, and return the correct location.

    GeoIP is one service you can use.

    Regards,
    Jordan

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,875
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Of course the IP address identifies the location of your ISP rather than you individually and can be easily defeated by connecting via a proxy server located elsewhere which will report the location of the server rather than the location of your ISP.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  6. #6
    SitePoint Enthusiast
    Join Date
    Jun 2005
    Location
    Texas, USA
    Posts
    76
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thank You

    Thanks to everyone who supplied such great information. This certainly helps and points me in the right direction. Thanks again!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •