Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/09/2005, 14:57
Avatar de ancubero
ancubero
 
Fecha de Ingreso: octubre-2003
Ubicación: San Jose Costa Rica
Mensajes: 54
Antigüedad: 20 años, 5 meses
Puntos: 0
enviar informacion mediante post a un servidor HTTPS

Hola a Todos.

tengo este script

Código PHP:
<?
$host 
"www.sitiodestino.com";
$method "POST";
$path "/servicios/elscript.asp";
$data $PostString;

    
$method strtoupper($method);

    
$fp fsockopen($host443);
    
fputs($fp"$method $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($data) . "\r\n");
    
fputs($fp"Connection: close\r\n\r\n");
    if (
$method == 'POST') {
        
fputs($fp$data);
    }
    while (!
feof($fp)) {
               
$buf .= fgets($fp);
    }

     echo  
$buf;
?>
cuando llego a la parte de $buf .= fgets($fp); el script se queda sin hacer nada y despues me da un timeout.

el problema es que definitivamente tiene que ser a https si alguien sabe de algun script se lo agradeceria.

Gracias