title: PHP file upload using using CURL
body: <p>I am using PHP for uploading file from sever s1 to server s2 my code is:</p>
  
  <pre><code>// initialise the curl request
      $request = curl_init('http://myip/filepath/');
  
      // send a file
      curl_setopt($request, CURLOPT_POST, true);
      curl_setopt(
          $request,
          CURLOPT_POSTFIELDS,
          array(
            'file' =&gt; new CurlFile('photos/081452_7893637.jpg')
          ));
  
      // output the response
      curl_setopt($request, CURLOPT_RETURNTRANSFER, true);
      echo curl_exec($request);
  
      // close the session
      curl_close($request);
  </code></pre>
  
  <p>When I run the this script the error is:</p>
  
  <pre><code>The requested URL / was not found on this server.
  </code></pre>
  
  <p>But when i browse it from URL it works fine.
  Could anyone help please what is wrong with my script?
  Thanks</p>