katmai Posted June 27, 2007 Report Posted June 27, 2007 Scriptul urmator..este cel mai simplu script de useri online....as minti daca as pune ca este 100% facut de mine...dar in mare parte da.<?php$remote = $_SERVER["REMOTE_ADDR"];$file = "users/online.txt";$timeoutseconds = 30; $timestamp = time();$timeout = ($timestamp-$timeoutseconds);$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 "$online";}else{echo "$online";}?>1.Creezi un folder users.2.dupa aia mai un fisier online.txt ii dai la online.txt chmod 7773.scriptul il incluzi intr-o pagina foarte simplu <? include("online.php"); ?>Unde online.php este numele cum a fost salvat scriptul,dumneavoastra modificati cu numele ales de dumneavoastra.ENJOY! :idea: Quote