I am using fsockopen() exactly as described on php.net to open an http socket and read a remote document (I am not using fopen() because I need the timeout features of fsockopen()).
So I need to parse the body of the response from the headers by splitting at the blank line, right? But in my tests, I'm getting 3 or 4 mysterious garbage characters after the blank line and before the body. If I pull the same document from the command line with curl -i, the extra chars don't appear!
See it for yourself on my test page:
http://64.47.72.48/fsockopen.php
Try entering urls for google, yahoo, etc...
I've seen this with php 4.1.2 - 4.3.8. Wonder if this is a php bug? Any suggestions what's going on? Anyone ever seen this before??
Thanks!!