Forum Moderators: phranque

Message Too Old, No Replies

display who is currently logged onto a website

         

bilenkyj

2:00 pm on Apr 29, 2008 (gmt 0)

10+ Year Member



Hi Guys,

I use this

if (preg_match('/Basic\s+(.*)$/i', $_SERVER['HTTP_AUTHORIZATION'], $matches))
{
list($name, $password) = explode(':', base64_decode($matches[1]));
$_SERVER['PHP_AUTH_USER'] = strip_tags($name);
$_SERVER['PHP_AUTH_PW'] = strip_tags($password);
}
//echo "<p>Username is ", $_SERVER['PHP_AUTH_USER'], "</p>";
//echo "<p>Password is ", $_SERVER['PHP_AUTH_PW'], "</p>";

to obtain the apache htaccess username to display on website and update database, is there something similar i can use that will show me who is currently logged on to a website? i want to display that on the front page of my website

i didnt want to use cookies or database