Hi Thomas, The following code should help you... Note that you have to turn off anonymous access in IIS, so that the user authenticates to a domain.
<? $ip = getenv("REMOTE_ADDR"); echo("IP address is $ip<BR>"); $user_chunks = explode("\\",strtoupper(getenv("REMOTE_USER"))); $user_domain = $user_chunks[0]; $user_name = $user_chunks[1]; echo("User domain is $user_domain<BR>"); echo("User name is $user_name<BR>"); ?> James -----Original Message----- From: Thomas Franz [mailto:[EMAIL PROTECTED]] Sent: 23 January 2003 10:44 To: [EMAIL PROTECTED] Subject: [PHP] get current username from the windows system Hi. is their a possibilty to get the windows username of the current logged on user with php. I want this to make a logon dialog more comfortable. Thanks for an answer and a little example if it's possible. Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This email is only intended for the person(s) to whom it is addressed and may contain confidential information. Unless stated to the contrary, any opinions or comments are personal to the writer and do not represent the official view of the company. If you have received this e-mail in error, please notify us immediately by reply e-mail and then delete this message from your system. Please do not copy it or use if for any purposes, or disclose its contents to any other person. We make every effort to keep our network free from viruses. You should independently check this e-mail and any attachments for viruses, as we can take no responsibility for any computer viruses that might be transferred by way of this e-mail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php