By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,743 Members | 1,810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,743 IT Pros & Developers. It's quick & easy.

IIS fsockopen

P: n/a
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
?>
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
i forgot to say that the very same script works on my own apache web
server...
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.