Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2005
    Posts
    66
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Most Users Ever Online

    So, I've been using this script to show how many users are currently online:
    PHP Code:
    <?php

    $rip 
    $_SERVER['REMOTE_ADDR'];
    $sd  time();
    $count 1;

    $file1 "ip.txt";
    $lines file($file1);
    $line2 "";

    foreach (
    $lines as $line_num => $line)
        {
            
    //echo $line."<br>";
            
    $fp strpos($line,'****');
            
    $nam substr($line,0,$fp);
            
    $sp strpos($line,'++++');
            
    $val substr($line,$fp+4,$sp-($fp+4));
            
    $diff $sd-$val;
            if(
    $diff 300 && $nam != $rip)
                {
                 
    $count $count+1;
                 
    $line2 $line2.$line;
                 
    //echo $line2; 
                
    }
        }

    $my $rip."****".$sd."++++\n";
    $open1 fopen($file1"w");
    fwrite($open1,"$line2");
    fwrite($open1,"$my");
    fclose($open1);
    ?>
    Could someone show me how to add something into this script that will show how many users was the most ever online? Also, if its not too hard, the date they were online.

    Thanks,
    X

  • #2
    New Coder
    Join Date
    Apr 2007
    Location
    India
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    user online script

    Hi x,

    Just go through this script and make use of it in your way

    http://www.hscripts.com/scripts/php/usersOnline.php

    Come back for any issues
    GemGuy

    Be friend of me
    Hey what a fun

  • #3
    New Coder
    Join Date
    Nov 2005
    Posts
    66
    Thanks
    8
    Thanked 0 Times in 0 Posts
    This is identical to the script I just posted. -_-

    I need an ADDITION to that script that will record the most users ever online and display it.


  •  

    Posting Permissions

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