Users Online snippet 1.0

Operating systemsOS : Windows / Linux / BSD
Program licensingScript Licensing : Freeware
CreatedCreated : Aug 28, 2006
Size downloadDownloads : 2
Program licensing
Thank you for voting...

<i>Users Online - Shows the amount of users online at ...

users_online - Shows the amount of users online at a time.
Source Code//vars
$file_name = "online. dat. php";
$c_time = time();
$timeout = 300;
$time = $c_time - $timeout;
$ip = getenv("REMOTE_ADDR");
if(!file_exists($file_name)){
$fp = fopen($file_name, "w");
fwrite($fp, " ");
fclose($fp);
}
//write to file
$fp = fopen($file_name, "a");
$write = $ip. "||". $c_time. " ";
fwrite($fp, $write);
fclose($fp);
//open file to as array, to count online
$file_array = file($file_name);
$online_array = array();
for($x = 1; $x = $time){
array_push($online_array, $ip);
}
}//end for
$online = array_unique($online_array);
$online = count($online);
if($online == "1"){
print "User online: $online". "
";
}else{
print "users online: $online". "
";
}
?

Users Online snippet 1.0 scripting tags: users, fwritefp, online, fopenfilename, print, array, users online, users online snippet, online snippets, php, users snippets, timeout. What is new in Users Online snippet 1.0 software script? - Unable to find Users Online snippet 1.0 news. What is improvements are expecting? Newly-made Users Online snippet 1.1 will be downloaded from here. You may download directly. Please write the reviews of the Users Online snippet. License limitations are unspecified.