dopo mille peripezie sono riuscito a installare apache 1.3.29 + ssl +
php sul mio winzozz!
il tutto perchè sto cercando di aprire una pagina risultato di un post
che sta sotto un'altro server (non di mia proprietà) sotto https.
Praticamente voglio inviare i dati del form alla pagina php,
prendere il risultato della pagina e lavorarmelo il tutto con il
seguente codice (esclusa la lavorazione con le espressioni regolari
che devo ancora fare):
Codice PHP:
<?
$host = "www.dominioesterno.it";
$port = 443;
$path = "/db/info/cerca.php";
$poststring = "form=cerca&cognomenome=arm&accesskey=t";
$fp = fsockopen("ssl://".$host, $port, $errno, $errstr, $timeout = 30);
if(!$fp){
//error tell us
echo "$errstr ($errno)\n";
}else{
//send the server request
fputs($fp, "POST $path HTTP/1.1\r\n");
fputs($fp, "Host: $host\r\n");
fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n");
fputs($fp, "Content-length: ".strlen($poststring)."\r\n");
fputs($fp, "Connection: close\r\n\r\n");
fputs($fp, $poststring . "\r\n\r\n");
//loop through the response from the server
while(!feof($fp)) {
echo fgets($fp, 4096);
}
//close fp - we are done with it
fclose($fp);
}
?>
ma mi dice:
Warning: fsockopen(): no SSL support in this build in g:\htdocs\pagina.php on line 25
Warning: fsockopen(): unable to connect to www.dominioesterno.it:443 in g:\htdocs\pagina.php on line 25
Operazione terminata con successo. (0)
alla linea 25 ho:
$fp = fsockopen("ssl://".$host, $port, $errno, $errstr, $timeout = 30);
come mai?