Jump to content
MakeWebGames

PHP GD Question


BoGFx

Recommended Posts

Hello MWG, I am in need of a tad bit of help. I need to create a dynamic image, with text, and the text needs to be able to use HTML. I can only get 2/3 the way with php GD. I can not get html to work in php GD. Example:

 

$info ="<a href=google.com>Google</a>";
$image = imagecreatetruecolor(200, 100);
$black = imagecolorallocate($image, 0x00, 0x00, 0x00); 
$font_file = 'images/arial.ttf'; 
imagettftext($image, 8, 0, 0, 1, $black, $font_file, $info);
header('Content-Type: image/png');
imagepng($image);
imagedestroy($image);
?>

 

That would just return <a href=google.com>Google</a>

Any help? Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...