esse é o meu site... de rom e emuladores... http://www.worldemulators.kit.net ateh mais galera!!



Posted 17/01/2003, 20:05
Posted 17/01/2003, 20:10
Posted 17/01/2003, 20:32
<?
$version = "ver 1.0";
// Timeout - After this time the users will
// be deleted (in minutes)
$timer = 30;
/*
**
** DON'T MODIFY BELOW
**
*/
// Name of the file where all the data, about
// the user's activity will be saved
// Chmod for log.txt file is 666
$filename = "log.txt";
if (!$datei) $datei = dirname(__FILE__)."/$filename";
$time = @time();
// Encode IP to anti Hacker
$realip = $REMOTE_ADDR;
$div = explode('.',$realip);
$div0 = $div[0];
$div1 = $div[1];
$div2 = $div[2];
$div3 = $div[3];
$salt = "20";
$fakediv0 = $div[0]*md5($salt);
$fakediv1 = $div[1]*md5($salt);
$fakediv2 = $div[2]*md5($salt);
$fakediv3 = $div[3]*md5($salt);
$fakeip = "$fakediv0.$fakediv1.$fakediv2.$fakediv3";
$access = $QUERY_STRING;
$string = "$access|$fakeip|$time\n";
$a = fopen("$filename", "a+");
fputs($a, $string);
fclose($a);
$timeout = time()-(60*$timer);
$all = "";
$i = 0;
$datei = file($filename);
for ($numff = 0; $numff < count($datei); $numff++) {
$pieces = explode("|",$datei[$numff]);
if ($pieces[2] > $timeout) {
$all .= $pieces[1];
$all .= ",";
}
$i++;
}
$all = substr($all,0,strlen($all)-1);
$arraypieces = explode(",",$all);
$useronline = count(array_flip(array_flip($arraypieces)));
// display how many people where activ within $timeout
//echo $useronline;
// Delete
$dell = "";
for ($numm = 0; $numm < count($datei); $numm++) {
$tiles = explode("|",$datei[$numm]);
if ($tiles[2] > $timeout) {
$dell .= "$tiles[0]|$tiles[1]|$tiles[2]";
}
}
if (!$datei) $datei = dirname(__FILE__)."/$filename";
$time = @time();
$string = "$dell";
$a = fopen("$filename", "w+");
fputs($a, $string);
fclose($a);
?>
<?
echo $useronline;
if($useronline == "1"){
echo " usuário online";
}
ELSE{
echo " usuários online";
}
?>
Posted 17/01/2003, 20:44
Posted 17/01/2003, 21:00
Posted 17/01/2003, 21:07
Posted 18/01/2003, 14:50
Posted 18/01/2003, 17:54
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)