Re: fsockopen on IIS

From: Dmitry Ruban (dima_at_region35.ru)
Date: 04/16/04


Date: Fri, 16 Apr 2004 17:58:14 +0400

yeah, RFC knows !

"thomas werth" <werth@cyber-ideas.com> wrote in message
news:407fbd30$0$16020$91cee783@newsreader02.highway.telekom.at...
> 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
> ?>
>
>
>