<?php
$response="";
if ($fp = fsockopen ("ssl://www.mycompany.com", 443, $errno, $errstr, 30))
{
$request ="POST /postHandler.php HTTP/1.0\r\n";
$request.="Host: www.mycompany.com\r\n";
$request.="Content-Type: application/x-www-form-urlencoded\r\n";
$request.="Content-Length: 7\r\n";
$request.="\r\n\r\n";
$request.="foo=bar";
fwrite($fp,$request,strlen($request));
while (!feof($fp))
$response.=fread($fp,8192);
fclose($fp);
}
else
die('Could not open socket');
echo "<pre>\n";
echo htmlentities($response);
echo "</pre>\n";
?>