note 32697 added to ref.ldap

From: Date: Wed, 04 Jun 2003 18:23:55 +0000
Subject: note 32697 added to ref.ldap
Groups: php.notes 
Request: Send a blank email to php-notes+get-49731@lists.php.net to get a copy of this message
If all else fails...Here is a quick, easy, cheat way to "piggy back" your authentication needs on top of someone else's authentication scheme. Typically in a large company, there is a web-accessible email application or a company intranet page that requires authentication. Find it. It doesn't matter if they are using Exchange, LDAP, or whatever. In a web browse try to place your username and password in the URL to see if it authenticates you. For example: http://username:password@intranet.company.com/. If you gain access without having to login, then you can use that page to do your authentication: $fp=@fopen("http://username:password@intranet.company.com/","r"); if ($fp) {$userisauthenticated=true; fclose($fp);} else {$userisauthenticated=false;} I know this is not the right way to go about it, but it works and can often prevent "petty turf wars". :-) ---- Manual Page -- http://www.php.net/manual/en/ref.ldap.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32697 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32697&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32697&report=yes

« previous php.notes (#49731) next »