simple who's online script i wanna listen others advice
Posted: Thu Oct 29, 2009 4:02 am
hi i try to make simple who's online php script
i fomulate a plan for that
the plan is this
two person enterd
both two thread write the ip and time to the server's txt file
each tread read that file so both can see each other
one person exited
thread is end as soon as the person is exited that couldnt delete the data from its person's thread
so delete old time data in another person's thread using time information
read the file line by line and delete the data which far away from now(maybe 1sec)
join the the line user<br/>user<br/>user<br/>
echo the line
but i donno why alivelist(in the main)is blinking and my server uses very many resource and alivelist out nothing in other computer or blinking and stop
i wanna to listen adivse thx in advanced
i attach the main.php and alive.php with zipped(less than 2kb)
i fomulate a plan for that
the plan is this
two person enterd
both two thread write the ip and time to the server's txt file
each tread read that file so both can see each other
one person exited
thread is end as soon as the person is exited that couldnt delete the data from its person's thread
so delete old time data in another person's thread using time information
read the file line by line and delete the data which far away from now(maybe 1sec)
join the the line user<br/>user<br/>user<br/>
echo the line
but i donno why alivelist(in the main)is blinking and my server uses very many resource and alivelist out nothing in other computer or blinking and stop
i wanna to listen adivse thx in advanced
i attach the main.php and alive.php with zipped(less than 2kb)