title: How to connect to twitpic API with PHP?
body: <p>I can't connect to the twitpic API. I've tried this:</p>
  
  <pre><code>$post = array (
      'key' =&gt; 'fghgfhdfghf',
      'consumer_token' =&gt; 'retert',
      'consumer_secret' =&gt; 'ertertwerwtetey',
      'oauth_token' =&gt; 'wety43y4y4wy',
      'oauth_secret' =&gt; 'seryeryereshrh',
      'message' =&gt; 'ffff',
      'media' =&gt; file_get_contents('http://img.yandex.net/i/www/logo.png')
  );
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'http://api.twitpic.com/1/upload.json');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_VERBOSE, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  
  $response = curl_exec($ch);
  echo $errno = curl_errno($ch);
  curl_close ($ch);
  echo $response;
  </code></pre>
  
  <p>What's wrong with this code? Can anyone give me an example of how to get this working?</p>