title: Posting images which are created by php
body: <p>I want to post created image to Twitter by Twitter api. 
  I can post jpg, png or gif files to Twitter by code just below.</p>
  
  <pre><code>$params = array(
      'status' =&gt; 'This is my text',
      'media[]' =&gt; '/images/image.png'
  );
  $reply = $cb-&gt;statuses_updateWithMedia($params);
  </code></pre>
  
  <hr>
  
  <p>I have created a png image by this code:</p>
  
  <pre><code>header("Content-Type: image/png");
  $im = @imagecreate(110, 20)
      or die("Cannot Initialize new GD image stream");
  $background_color = imagecolorallocate($im, 0, 0, 0);
  $text_color = imagecolorallocate($im, 233, 14, 91);
  imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
  imagepng($im);
  </code></pre>
  
  <p>How can i post this image<code>($im)</code> to Twitter?</p>