Re: fopen with login credentials being an email address

From: Date: Fri, 09 Jul 2004 16:26:40 +0000
Subject: Re: fopen with login credentials being an email address
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-190087@lists.php.net to get a copy of this message
Gunter Sammet wrote:
Yes I had quotes. And you're right the interpretation of the URL is as you laid it out. Unfortunatelly I don't have control on the login credentials. Tried %40 to replace the @ but then it won't be accepted as a login. Thanks for your reply! You need to use CHAP authentication, chap authentication in it's simplest form requires that the username password combination has to be sent as a base 64 encoded header. More details are available in RFC 2616 but rather than reinventing the wheel you might want to use an available HTTP class or curl.
To elaborate futher you have to open a socket as curt suggested and when you get the 40x (can't remember the number) header saying authentication required, you need to respond by sending the header described above.
open a connection to 'mydomain.com' on port 'mypassowrd@subdomain.maindomain.com', and send the username 'myname'.
-- Raditha Dissanayake. --------------------------------------------- http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits.

« previous php.general (#190087) next »