title: cURL upload files to remote server on MS Windows
body: <p>When I use linux and try upload file to remote server using this script then all is well. But if i use Windows then script not working.
  Script:</p>
  
  <pre><code>$url="http://site.com/upload.php";
  $post=array('image'=&gt;'@'.getcwd().'images/image.jpg');
  $this-&gt;ch=curl_init();
  curl_setopt($this-&gt;ch, CURLOPT_URL, $url);
  curl_setopt($this-&gt;ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($this-&gt;ch, CURLOPT_TIMEOUT, 30);
  curl_setopt($this-&gt;ch, CURLOPT_FOLLOWLOCATION, 0);
  curl_setopt($this-&gt;ch, CURLOPT_POST, 1);
  curl_setopt($this-&gt;ch, CURLOPT_POSTFIELDS, $post);
  $body = curl_exec($this-&gt;ch);
  echo $body; // &lt;&lt; on Windows empty result
  </code></pre>
  
  <p><strong>What am I doing wrong?</strong></p>
  
  <p>PHP 5.3</p>
  
  <p>Windows 7 - not working, Ubuntu Linux 10.10 - working</p>