No sé hasta qué punto te sea útil. Nunca lo probé así, pero una opción es usando
sockets. Para ello, debes tenerlos habilitados. Date una vuelta por estos links:
http://www.latindevelopers.com/forum/viewtopic.1168.html#p2800 http://www.php-hispano.net/foros/PHP/12852 http://www.php.net/manual/es/function.fsockopen.php#68616 http://www.php.net/manual/es/function.fsockopen.php#49938 Cita:
Iniciado por konrad dot meyer at gmail dot com en PHP.net The documentation example is of a GET request. I have found POST documentation to be lacking, and here's a function to easily simulate submitting form data: Código PHP:
<?php
# $host includes host and path and filename
# ex: "myserver.com/this/is/path/to/file.php"
# $query is the POST query data
# ex: "a=thisstring&number=46&string=thatstring
# $others is any extra headers you want to send
# ex: "Accept-Encoding: compress, gzip\r\n"
function post($host,$query,$others=''){
$path=explode('/',$host);
$host=$path[0];
unset($path[0]);
$path='/'.(implode('/',$path));
$post="POST $path HTTP/1.1\r\nHost: $host\r\nContent-type: application/x-www-form-urlencoded\r\n${others}User-Agent: Mozilla 4.0\r\nContent-length: ".strlen($query)."\r\nConnection: close\r\n\r\n$query";
$h=fsockopen($host,80);
fwrite($h,$post);
for($a=0,$r='';!$a;){
$b=fread($h,8192);
$r.=$b;
$a=(($b=='')?1:0);
}
fclose($h);
return $r;
}
?>
Un saludo,