title: How do I send a file with curl or Zend_Http_Client()
body: <p>Does anyone have an example of sending a file to a zend application using curl. I'm trying to simulate a client sending a file to a server scenario. So I tried these 2 ways, but I'm not getting any post data. This is the curl way with $post data</p>
  
  <pre><code>$url = 'http://test.com/test';
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_POST, true);
  $post = array(
    'file' =&gt; '@file.jpg'
  );
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post); 
  $response = curl_exec($ch);
  curl_close($ch);
  var_dump($response );
  </code></pre>
  
  <p>I also tried this with Zend_Http_Client</p>
  
  <pre><code>$client = new Zend_Http_Client($url);
  $client-&gt;setFileUpload('file.jpg', 'image');
  $response = $client-&gt;request();
  var_dump($results);
  </code></pre>
  
  <p>What am I supposed to do on the receiver end to receive the file? I'm not getting anything when I output <code>$this-&gt;_request-&gt;getParams()</code>. What is this supposed to look like?</p>