title: Problem with fwrite php
body: <p>I am getting problem while using fwrite in php. the following code works in my local computer but gives error in server.</p>
  
  <pre><code>$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
  if(!$fp) {
     echo 'Error: '.$errno.', '.$errstr;
  } else {
     fwrite($fp, 'kool');
  }
  </code></pre>
  
  <p>There is no error with fsockopen. it passes and gives no error. fwrite is not being able to write. it fails and returns no error only false</p>