Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: stats

  1. #1
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default stats

    can anyone tell me code for these lol i know theve been posted alot
    Users Online:
    Ip address:
    Date:
    Time:
    Hosting company: like server 80 execulink
    any other ones that are statistics'

    Originally Posted by bananasislegend
    this thread might be better than sex..

  2. #2
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    I think xEnigma.co.uk has a tutorial on this.

    I'll probably make one, check my PHP tutorial 1 for IP adress

    - Dan

  3. #3
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default

    thanx dan

    Originally Posted by bananasislegend
    this thread might be better than sex..

  4. #4
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    No problem dude, Did they have one?

    - Dan

  5. #5
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    I can't write you a script for show users online, as it would be pretty big.
    But this might work for the other stuff:
    PHP Code:
    <?php
        $ip 
    $_SERVER['REMOTE_ADDR']; //Gets IP
        
    $date date("d,M,y"); //Gets date
        
    $time date("G:i:s"); //Gets time
        
    echo "Your IP address is $ip<br />"//Puts the users IP on the page
        
    echo "The date is $date<br />"//Puts the date on the page
        
    echo "The time is $time"//Puts the time on the page
    ?>
    kinda quit.

  6. #6
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default

    no idea i tried to go there but cannot find server whats link to url tutorial?
    nets does that print to same page?
    lol nvm i got it
    - Colin
    lol how i get the users internet provider?

    Originally Posted by bananasislegend
    this thread might be better than sex..

  7. #7
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Dunno,

    Looks like the server is down "/

    - Dan

  8. #8
    Join Date
    Aug 2004
    Location
    bristol
    Posts
    3,799
    Tokens
    0

    Latest Awards:

    Default

    What are you asking for exactly? If you put that in a document with a PHP extention (and your host supports PHP) then it will put on the page you placed it on the date, time and IP address of the user.
    kinda quit.

  9. #9
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Ok.

    Create a .PHP file called onlinepeople.php

    Put the following code in it.

    PHP Code:

    $remote 
    $_SERVER["REMOTE_ADDR"];

    $file "log.txt"
    ;
    $timeoutsecs 30;

    $timestamp time();

    $timeout = ($timestamp-$timeoutsecs);

    $fp fopen("$file""a+");

    $write $remote."||".$timestamp."n";
    fwrite($fp$write);
    fclose($fp);

    $online_array = array();
    $file_array file($file);

    foreach(
    $file_array as $newdata){
    list(
    $ip$time) = explode("||"$newdata);
    if(
    $time >= $timeout){
    array_push($online_array$ip);
    }
    }

    $online_array array_unique($online_array);

    $online count($online_array);
    if (
    $online == "1") {
    echo 
    "People Online: $online";

    } else {

    echo 
    "People Online: $online";
    }
    ?> 
    The create a .txt file called log.txt

    Put it into the same directory as your other file and CHMOD log.txt to 777

    Thats shows how many people online.

    - Dan

  10. #10
    Join Date
    May 2005
    Location
    Burgessville
    Posts
    806
    Tokens
    0

    Default

    lol ok thanx guy u know on sirting sites if u go on it say
    Provider (example like Execulink server 6)
    thanx again dan

    - Colin

    Originally Posted by bananasislegend
    this thread might be better than sex..

Page 1 of 3 123 LastLast

Posting Permissions

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