note 22666 added to function.fsockopen
| From: | t dot hodder at globalgold dot co dot uk | Date: | Wed, 26 Jun 2002 12:52:02 +0000 |
| Subject: | note 22666 added to function.fsockopen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32220@lists.php.net to get a copy of this message | ||
You can post to a script that uses basic authentication if you create the
header like this and insert it into the relevant script above;
// Build the header
$header = "POST /path/to/script.cgi HTTP/1.0\r\nAuthorization: Basic ";
$header .= base64_encode("$username:$password") . "\r\n";
$header .= "Content-type: application/x-www-form-urlencoded\r\n";
$header .= "Content-length: " . strlen($request) . "\r\n";
$header .= "Connection: close\r\n\r\n";
--
http://www.php.net/manual/en/function.fsockopen.php
http://master.php.net/manage/user-notes.php?action=edit+22666
http://master.php.net/manage/user-notes.php?action=delete+22666
http://master.php.net/manage/user-notes.php?action=reject+22666