Skip to content

Instantly share code, notes, and snippets.

@Wickk
Created September 21, 2008 12:28
Show Gist options
  • Save Wickk/11866 to your computer and use it in GitHub Desktop.
Save Wickk/11866 to your computer and use it in GitHub Desktop.
<?php
$data = file("test.txt");
header("Content-type: image/png");
$im = @imagecreate(380, 160)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 175, 00, 00);
imagestring($im, 1, 5, 5, "$data", $text_color);
imagepng($im);
imagedestroy($im);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment