 <p>See:</p> <blockquote> <p><strong>Warning</strong> If a connection opened by fsockopen() wasn't closed by the server, feof() will hang. To workaround this, see below example:</p> </blockquote> <p>On: <a href="http://php.net/feof" rel="nofollow">feof</a></p> <p>The workaround essentially waits <code>default_socket_timeout</code> and then terminates the while-loop.</p>