note 22666 deleted from function.fsockopen by danbrown

From: Date: Mon, 18 May 2009 02:00:08 +0000
Subject: note 22666 deleted from function.fsockopen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-155617@lists.php.net to get a copy of this message
Note Submitter: t dot hodder at globalgold dot co dot uk ---- 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; <?php // 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"; ?>

« previous php.notes (#155617) next »