Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 9 of 9

Thread: Ip

  1. #1
    Join Date
    May 2005
    Posts
    826
    Tokens
    0

    Default Ip

    How do I log Ip's coming on to my site???





    alex126

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    that should all be in your raw access logs anyway, but if u have php a logger system would be pretty simple, just get the ip, and append a flat file with what ever one it detects every page activation

  3. #3
    Join Date
    May 2005
    Posts
    826
    Tokens
    0

    Default

    Quote Originally Posted by Mentor
    that should all be in your raw access logs anyway, but if u have php a logger system would be pretty simple, just get the ip, and append a flat file with what ever one it detects every page activation

    oky dockey. Hotscripts it is

  4. #4
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    =.=
    ok ok, heres a basic script to do it, just ads each ip to a new line, thats all it does thogh so if u wanted other stats with it youd have to ask
    PHP Code:
    <?php
    //file (chmod it to 777)
    $file "ips.txt";
    // get ip
    $userip $_SERVER['REMOTE_ADDR'];
    // write ip data to file
    $fp fopen($file"a") or die( "Error" );
    fputs($fp"$userip \n");e
    fclose
    ($fp);
    ?>

  5. #5
    Join Date
    May 2005
    Posts
    826
    Tokens
    0

    Default

    Quote Originally Posted by Mentor
    =.=
    ok ok, heres a basic script to do it, just ads each ip to a new line, thats all it does thogh so if u wanted other stats with it youd have to ask
    PHP Code:
    <?php
    //file (chmod it to 777)
    $file "ips.txt";
    // get ip
    $userip $_SERVER['REMOTE_ADDR'];
    // write ip data to file
    $fp fopen($file"a") or die( "Error" );
    fputs($fp"$userip \n");e
    fclose
    ($fp);
    ?>

    So do I put this on the page of my site???

  6. #6
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    yup, as long as your host suppoorts php, and the page type is php it will work.
    athogh rember to create the file ips.txt and chmod it to 777

  7. #7
    Join Date
    May 2005
    Posts
    826
    Tokens
    0

    Default

    Quote Originally Posted by Mentor
    yup, as long as your host suppoorts php, and the page type is php it will work.
    athogh rember to create the file ips.txt and chmod it to 777

    Dam It wont work I keep on getting interneal server error and stuff

  8. #8
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    i just noticed a roag letter that shoulnt be try this.
    PHP Code:
    <?php
    //file (chmod it to 777)
    $file "ips.txt";
    // get ip
    $userip $_SERVER['REMOTE_ADDR'];
    // write ip data to file
    $fp fopen($file"a") or die( "Error" );
    fputs($fp"$userip \n");
    fclose($fp);
    ?>

  9. #9
    Join Date
    May 2005
    Posts
    826
    Tokens
    0

    Default

    Edit: its working now


    +rep

Posting Permissions

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