hi all :))

i have a problem with fopen()

1) i open the connection to the server
$fp = fsockopen ("www.testserver.at", 80, &$errno, &$errstr, 30);

2) i make the fputs()
fputs ($fp, 'GET /cgi-bin/portal/frameset.jsp HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword,
*/*
Weferer: TFJMVRESKPNKMBIPBA
Accept-Language: de-at
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Host: www.testserver.at
Connection: Keep-Alive

');

3) i read the output
                                while (!feof($fp)) {
          $contents .= fread ($fp,1280);
                                }
  echo $contents;


Well ... the problem now is: the server sends the answer in more than 1
packet back ... like this:

1st Packet:
HTTP/1.1 200 OK
Server: Netscape-Enterprise/4.1
Date: Thu, 05 Dec 2002 03:29:17 GMT
Cache-control: no-cache
Content-type: text/html
Expires: Sun, 01 Jan 1995 00:00:00 GMT
Pragma: no-cache
Connection: close

and then the content in some following packets ... the problem ---> my
script just shows me the FIRST packet :-((
*believe it's because of the EOF from the first packet?!?*

and i have no clue how to get the other packets ... would be glad if someone
of you could help me :)) *THX*
and sorry for my bad english :((

So long
Hellkeeper aka Andi



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to