How to show text 2 image in PHP?

I did this, but it is not working…


<?php
$text = 'This is good';
$base_64_encoded = base64_encode($text);
?>
<img src="data:image/jpeg;base64,<?php echo $base_64_encoded; ?>" />

Please check tutorial for converting text to image.
http://www.phpro.org/examples/Text-to-Image-with-GD.html