Hi,
I'm using fsockopen to send some HTTP headers to a server. One of the header's is:
$out .= "Accept-Encoding: gzip\r\n\r\n";
However, this code that usaully works with plain html sites, does not work with the gzip data:
fputs($fp,$out);
while(!feof($fp)) {
fgets($fp,128);
}
The "while(!feof($fp)) {" line in paritcular - it never gets there. Also, the fgets line returns the header's sent back, but choke on showing the gzip data. Any idea why? Any idea what code to add so that it stops outputting when the end of the gzip data comes?
Thanks!