hi!
my code here accesses an IIS server and returns
HTTP/1.1 400 Bad Request Server: Microsoft-IIS/5.0 Date: Fri, 16 Apr 2004
10:36:56 GMT Content-Type: text/html Content-Length: 87 The parameter is
incorrect.
what am i doing wrong? does anyone know what a valid http post header for
IIS would look like?
thnx,
tom
<?php
$fp = fsockopen("www.suedtirol.info", 80, $errno, $errstr, 30);
if (!$fp)
{
echo "$errstr ($errno)<br />\n";
}
else
{
$out = "HEAD /XmlApi/Demo/SeekEngine.Get http/1.0\r\n";
$out .= "Host: www.suedtirol.info\r\n";
$out .= "Connection: Close\r\n\r\n";
fputs($fp, $out);
while (!feof($fp))
{
echo fgets($fp, 128);
}
fclose($fp);
}
//php fsockopen IIS error
?>