Current location: Hot Scripts Forums » Programming Languages » PHP » PARSE Question


PARSE Question

Reply
  #1 (permalink)  
Old 09-02-03, 10:15 AM
clintre clintre is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
PARSE Question

I have worked with PHP for a while, but by no means am I even an advanced user.

I have been trying to parse a result to give me the result I need.

I am running on IIS in a Windows domain.

What I am attpmting to do is get the domain authenticated user from windows which I have done using

$_SERVER['AUTH_USER'];


Which works fine with one problem. It returns it as domain\\username

What I need help on is Parsing the result to go from domain\\username to username.

I would appreciate any help!!
Reply With Quote
  #2 (permalink)  
Old 09-02-03, 11:10 AM
YourPHPPro's Avatar
YourPHPPro YourPHPPro is offline
Community VIP
 
Join Date: Aug 2003
Posts: 430
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
<?
list($domain,$username) = split ('[\]', $_SERVER['AUTH_USER'], 2);
print "Domain: $domain\nUserName: $username\n\n";

?>
Something like that should work.
Reply With Quote
  #3 (permalink)  
Old 09-02-03, 12:30 PM
clintre clintre is offline
Newbie Coder
 
Join Date: Aug 2003
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks that will do.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl-PHP software Copyright question! kevin PHP 8 10-29-03 08:03 AM
PHP script to parse HTML Skeleton Man Script Requests 2 10-05-03 08:41 PM
Stupid question ( i think.. ) !!! Giullare ASP 2 10-01-03 02:21 AM
PHP header question khadlock PHP 2 09-23-03 08:17 AM
Web Stat Question ossi44 New Members & Introductions 2 06-13-03 09:36 AM


All times are GMT -5. The time now is 06:49 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.