title: Dynamic PHP image with a PNG extension
body: <p>I'm trying to make an image similar to one of these: <a href="http://www.danasoft.com/vipersig.jpg" rel="nofollow">http://www.danasoft.com/vipersig.jpg</a></p>
  
  <p>Not really content wise (displaying IP addresses and headers), but more so a PHP image displayed in a PNG format (so I can use it on websites, within BB image tags).</p>
  
  <p>I know how to create a dynamic image, but that's only when you visit the PHP pages.  Currently using this if it's matters:</p>
  
  <pre><code>$image = imagecreate(200, 60);
  $text_color = imagecolorallocate($image, 255, 255, 0);
  
  header("Content-type: image/png");
  
  imagestring($image, 4, 40, 30, "hello", $text_color);
  
  imagepng($image);
  imagecolordeallocate($text_color);
  imagedestroy($image);
  </code></pre>
  
  <p>Any thoughts on how this could be achieved?</p>
  
  <p>A few more examples of what I'm looking for are: <a href="http://draynor.net/signatures" rel="nofollow">http://draynor.net/signatures</a></p>
  
  <p>Edit: most comments are about converting from PNG to PHP, I want to convert from PHP to PNG, just to clear it up.</p>