What informations you can get about a visitor through PHP

Discussion in 'PHP' started by Website_Playboy, Jul 17, 2011.

  1. #1
    So far i got,

    $ip = $_SERVER['REMOTE_ADDR']; < Visitors ip
    $brow = $_SERVER['HTTP_USER_AGENT']; < Visitors User agent/Browser
    $port = $_SERVER['REMOTE_PORT']; < Visitors Port
    $host = $_SERVER['REMOTE_HOST']; < VIsitors Host
    $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; < Visitors browser language

    Are there any other nice information we can get about visitors from a php page?
     
    Website_Playboy, Jul 17, 2011 IP
  2. SiJz

    SiJz Peon

    Messages:
    51
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try here:
    http://php.net/manual/en/reserved.variables.server.php
    Code (markup):
    You can also use javascript to get a load of browser info/capabilities and pass it back to your php (the stuff you'd see on Google Analytics)

    Si
     
    SiJz, Jul 17, 2011 IP
  3. Website_Playboy

    Website_Playboy Member

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    I knew this link but i needed more explanation about the codes which can be used. Because for example i donno the difference between 'HTTP_HOST' and 'REMOTE_HOST" Therefor i can really understand everything on that page.
    I was asking for the information to be posted in a similar format i provided above on the first message.

    $ip = $_SERVER['REMOTE_ADDR']; < Visitors ip
    $brow = $_SERVER['HTTP_USER_AGENT']; < Visitors User agent/Browser
    $port = $_SERVER['REMOTE_PORT']; < Visitors Port
    $host = $_SERVER['REMOTE_HOST']; < VIsitors Host
    $lang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; < Visitors browser language

    I am still a newbie about these so i need a clear and easy to understand explanation.
     
    Website_Playboy, Jul 17, 2011 IP
  4. Deltazon

    Deltazon Member

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    $url = $_SERVER['HTTP_REFERER']; < The URL from which the visitor comes from. For example, if the visitor clicks on yourdomain.com link on website example.com, then $url would be example.com
    $currenturl = $_SERVER['REQUEST_URI']; < Visitor's current URL in the browser
     
    Deltazon, Jul 17, 2011 IP
  5. Website_Playboy

    Website_Playboy Member

    Messages:
    115
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #5
    Cool. Any other?
    Actually i was wondering if i could get the COMPUTER NAME of the visitor?
     
    Website_Playboy, Jul 17, 2011 IP