#1
  1. No Profile Picture
    stefanbecker
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi,

    how do i get some information about my visitors?
    Things like IP, Operating System,used browser, referrer url and so....

    Thx
  2. #2
  3. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    Your webserver's log is going to have the majority of that information.

    If you want that info to use in a PHP script, fire up a page containing the command php_info();

    On that page you will find all values that PHP knows and the respective variable name for use in your script.
  4. #3
  5. No Profile Picture
    donarb
    Guest
    Devshed Newbie (0 - 499 posts)
    Depends on when you need that information. Like the previous poster mentioned, you can get it out of the web server log.

    If you need it in real time, for your CGI, there are environment variables that the server provides, things like $HTTP_USER_AGENT (browser) and $REMOTE_ADDR (IP address). PHP automatically provides these to you, you merely need to reference them.

    You can get a list of the standard environment variables for CGI use at http://hoohoo.ncsa.uiuc.edu/cgi/env.html

    [This message has been edited by donarb (edited 09-15-99).]
  6. #4
  7. No Profile Picture
    timbo
    Guest
    Devshed Newbie (0 - 499 posts)
    I'm doing it at the moment heres the script

    <?
    $timestamp=date("d-m-Y");
    $timestamp2=time();
    $file="/whatever/your/directory/structure/is/files/".$timestamp.".txt";
    $fp=fopen($file,'a');
    if (!$UserID)
    {
    $UserID=" ";
    }
    if (!$frame)
    {
    $frame=" ";
    }
    fputs($fp,"$REMOTE_ADDR,$timestamp2,$UserID,$frame,$REQUEST_URIn");

    ?>

    this will log your users into a file dated for each days access. You cans then cat them to sort it and merge them

Similar Threads

  1. Can user A read user B's session?
    By Stupid Khor in forum PHP Development
    Replies: 9
    Last Post: May 11th, 2004, 05:19 AM
  2. user authentication and real player files
    By kyawkyaw in forum PHP Development
    Replies: 0
    Last Post: February 12th, 2004, 10:32 PM
  3. Multiple Cookies for user
    By Chris24 in forum HTML Programming
    Replies: 0
    Last Post: January 22nd, 2004, 09:27 AM
  4. php user levels
    By dynasty in forum PHP Development
    Replies: 1
    Last Post: January 20th, 2004, 02:01 PM
  5. How to get multiple sessions for one user working?
    By jkoerber in forum PHP Development
    Replies: 1
    Last Post: January 16th, 2004, 01:23 PM

IMN logo majestic logo threadwatch logo seochat tools logo