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://".$host, 80, $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($fp, 128);
}
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...