Hello Guys Can some one help me in putting up this data on my site just like some of other sites....for example at the bottom on the index page at website outlook dot com you will see this. Users online: 428 Page loadtime: 0.3035 Can you please let me know how this is done ?
Check this site out: http://www.devarticles.com/c/a/PHP/The-Quickest-Way-To-Count-Users-Online-With-PHP/
$usersOnline = count(glob(session_save_path().'/sess*')); // counting active sessions $pageLoadtime = microtime(true) - $_SERVER['REQUEST_TIME']; PHP:
Well the best way to do is use http://whos.amung.us/ service.You just need add a js script at the footer and it will display no of users online.
<?php $usersOnline = count(glob(session_save_path().'/sess*')); // counting active sessions $pageLoadtime = microtime(true) - $_SERVER['REQUEST_TIME']; echo $usersOnline, ' : ', $pageLoadtime; ?> PHP:
it worked and is showing me the number of users online as 600 plus and I think its showing the users online for the server and I want the users online for my site only as I m on a shared server ..