The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    how can I get to know the IP address when someone visits my site

    Discussion in 'Networking and Wireless' started by kenny1999, Feb 13, 2017.

  1. kenny1999

    kenny1999 Notebook Evangelist

    Reputations:
    26
    Messages:
    359
    Likes Received:
    28
    Trophy Points:
    41
    I made search on google about how to get to know the IP address when someone contacts me .


    It looks like there is one way that as someone visits the website you own, it's possible to get to know his IP address through the HTTP log. However, there is no details.

    Would anyone tell me the details? Thanks so much
     
  2. SevasTra

    SevasTra Newbie

    Reputations:
    0
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    6
    You can use a stats application that reads your web logs and provide this information such information in reports or graphs. SmarterTool offers a free version that would meet your needs.

    http://www.smartertools.com/free-editions.aspx

    Another option is to use Logparser to parse the web logs and gather this information. Once you install logparser on the server you could use the following example to provide a list of all unique visitors (IP addresses) that accessed the site.

    logparser.exe "SELECT DISTINCT date, c-ip INTO c:\temp\visitors.txt FROM C:\WINDOWS\system32\LogFiles\W3SVC1\logfilename.log" -i:W3C -o:W3C
     
    kenny1999 likes this.
  3. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Super easy. Figure out what web server software you're running. Read the documentation to figure out where the log file is. Usually in a standard location, like /var/log/apache2/access.log. This is a plain text file, there's nothing complicated about it. In it you will see every request your server has served along with info like the browser (user agent), referer (the page they clicked through from, and yes it's spelled incorrectly in the HTTP spec), IP address, possibly resolved to hostname, and which page they were requesting along with an HTTP status code.

    You can actually learn a lot from a simple HTTP request, if you are able to log things like request headers and use a bit of javascript to dig into browser details. This is what things like google analytics and facebook do to track users.
     
    Jarhead and jaug1337 like this.