logged-in-user detection with php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
adyroman
Forum Newbie
Posts: 1
Joined: Sat Feb 22, 2003 3:19 pm

logged-in-user detection with php

Post by adyroman »

Hi there!
I have searched all over http://www.php.net and I cannot seem to find anything about this. I am looking for a method to identify the logged in user on the remote machine (the machine that is displaying the results of the script). From all I've read so far I have seen that Apache (the web server used) gives the IP address of the remote computer (which is running Windows 2000 Professional, if it helps), but nothing about the logged user on that computer. I know that it can be done with ASP, but I am not interested in using that; since ASP can do it, I don't see why PHP could not do it.
Can anybody point out some usefull info?
Thanks.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If it's available it will be in the $_SERVER array, use the following code to see all of the information in the $_SERVER array:

Code: Select all

echo '<pre>';
print_r($_SERVER);
echo '</pre>';
Mac
Post Reply