
07-06-2006, 12:56
|
|
|
|
חבר מתאריך: 03.12.04
הודעות: 317
|
|
|
צריך עזרה עם קוד שמצאתי כאן
ערכתי חיפוש ומצאתי את הקוד הזה
קוד PHP:
<?php $dfile = "data.txt"; //data file $handle = fopen( "$dfile" , "a+" ); //resource handle if (!$_COOKIE['online']) { fwrite( $handle , time()."-" ); //write the time according to the unix timestamp setcookie( "online" , "bla" , time()+60 ); } $data = file_get_contents( "$dfile" ); //get data from the data file $get_array = explode( "-" , $data ); //seperates each entrance $conter = 0; for ($i=0 ; $i<count( $get_array ) ; $i++) { //getting the data relevent to the time now! if ( $get_array[$i] + 1> time()) $counter = $counter+1; } echo $counter; ?>
שמציג כמה גולשים באתר
אני רוצה לעשות דבר כזה
שהוא יציג לי בניהול כמה גולשים יש באתר
איך אני עושה דבר כזה ?
|