[wd_asp elements=’search’ ratio=’100%’ id=1]

Show all current sessions

20th July 2013

Php - Miscellaneous

php codehaven

This code shows all session variables that are active.

$val){
echo $key." ".$val;
}
?>

You just have to set each page with a session as the name of the page and with a time, the this will show/track how many people are viewing what page via the admin-logs page, it will search and show info put out by the session such as the name of page and time. Easy with wordpress, just add this to the header. Just count the loops, and that will show you the amount. Add this to your home page to show how many users online at the present time you just entered that webpage.

Setting session variables