Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/06/2009, 07:55
Avatar de farra
farra
 
Fecha de Ingreso: marzo-2008
Ubicación: Aqui estoy
Mensajes: 574
Antigüedad: 16 años, 1 mes
Puntos: 20
Respuesta: POST sin formulario ni variables ocultas

ya descubri el error, era un error estupido nose como no me di cuenta, ahora modifique un poco el codigo y logre quitar ese error pero ahora me da otro error...
Código PHP:
<?php

$host 
gethostbyaddr($_SERVER['REMOTE_ADDR']);

# working vars
$host 'localhost/test/recibepost.php';
$service_uri '/cgi-bin/processACT';
$vars ='code=22&act=TEST';

# compose HTTP request header
$header "Host: $host\r\n";
$header .= "User-Agent: PHP Script\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: ".strlen($vars)."\r\n";
$header .= "Connection: close\r\n\r\n";

$fp pfsockopen("http://".$host80$errno$errstr);
if (!
$fp) {
   echo 
"$errstr ($errno)<br/>\n";
   echo 
$fp;
} else {
    
fputs($fp"POST $service_uri  HTTP/1.1\r\n");
    
fputs($fp$header.$vars);
    
fwrite($fp$out);
    while (!
feof($fp)) {
        echo 
fgets($fp128);
    }
    
fclose($fp);
}

?>
el error que me tira es:

Warning: pfsockopen() [function.pfsockopen]: unable to connect to http://localhost/test/recibepost.php:80 (Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?) in C:\wamp\www\test\enviapost.php on line 63
Unable to find the socket transport "http" - did you forget to enable it when you configured PHP? (24)


pero sin embargo tengo activada la extencion http en mi php.ini

nose xq me sigue dando ese error...
__________________
Firma:
Es mas dificil para el mono entender que el hombre desciende de el....

PD: Siempre doy karma al que me da una buena respuesta... ;0)

Última edición por farra; 16/06/2009 a las 08:11