...

View Full Version : Most Users Ever Online



Xibe
08-18-2007, 01:31 AM
So, I've been using this script to show how many users are currently online:

<?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

gemguy
08-18-2007, 05:08 AM
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

Xibe
08-18-2007, 05:19 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum