Re: fsockopen questions

From: Date: Wed, 23 Jan 2002 14:02:56 +0000
Subject: Re: fsockopen questions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81683@lists.php.net to get a copy of this message
About the SSL part I don't know. But authorization is possible: $request = "POST <URI> HTTP/1.0\r\n". "Host: <URL>\r\n". "User-Agent: <whatever you want>\r\n". "Connection: close". "Content-Type: application/x-www-form-urlencoded\r\n". "Authorization: Basic ".base64_encode("$username:$password")."\r\n". "Content-Length: <length of body>\r\n\r\n". "<request body>\r\n"; $socket = fsockopen($this->url, 80, &$errno, &$errstr); based upon HTTPPost ver 1.0.0 Author: Daniel Kushner Email: daniel@websapp.com www.websapp.com/classes And with GET instead of POST I think you can authorize via URL if you reform the URL like this: http://username:password@www.domain.com/ best regards Stefan Rusterholz ----- Original Message ----- From: "Daniel Reichenbach" <daniel.reichenbach@pixum.com> To: "Php-General" <php-general@lists.php.net> Sent: Wednesday, January 23, 2002 2:44 PM Subject: [PHP] fsockopen questions > Hy, > > for a project I need to connect to a SSL server with PHP. Additionaly I > have to authenticate myself with username/password with standard auth. > Is this possible with PHP's fsockopen function? I couldn't find any > hint on this in the manual. > > Greetings, > Daniel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > >

« previous php.general (#81683) next »