note 53389 added to function.fsockopen

From: Date: Tue, 31 May 2005 08:51:29 +0000
Subject: note 53389 added to function.fsockopen
Groups: php.notes 
Request: Send a blank email to php-notes+get-89670@lists.php.net to get a copy of this message
To retrieve a page from a HTTP server over a SSL connection (HTTPS), execute this script with an SSL enabled build of PHP, and enter your data. $fp = pfsockopen("ssl://yourwebsite.com", 443, $errno, $errstr); if (!$fp) { echo "$errstr ($errno)<br/>\n"; echo $fp; } else { fputs($fp, "GET /path/page.php HTTP/1.1\r\n"); fputs($fp, "Host: yourwebsite.com\r\n"); fputs($fp, "Authorization: Basic ".base64_encode("username:password")."\r\n"); fputs($fp, "Connection: close\r\n\r\n"); fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); ---- Manual Page -- http://www.php.net/manual/en/function.fsockopen.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53389 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53389&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53389&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53389&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53389&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53389&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53389&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89670) next »