Re: HTTP Authentication
| From: | Craige Leeder | Date: | Wed, 19 Nov 2008 14:34:42 +0000 |
| Subject: | Re: HTTP Authentication | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283533@lists.php.net to get a copy of this message | ||
Thiago H. Pojda wrote:
Guys, I have to access a WS that uses HTTP auth directly with PHP. I've tried using the usual http://user:pw@example.com/ but I couldn't get it working. I believe it has something to do with the password containing a # (can't change it) and the browser thinks it's an achor or something. All I've seen were scripts to implement HTTP Auth in PHP, nothing about actually logging in with PHP. Is it possible to send the authentication headers the first time I access the link? I could send all necessary headers to the page I'm trying to access and retrieve it's content at once. Thanks,Why don't you let yourself in regardless of the credentials and print them out to make sure they're being evaluated as you expect. - Craige