Hey I've created a script that works fine for adding text and borders to an image on the fly... my problem is that now I want to put <a href></a> tags around the image and have it link to somewhere... but I cannot do this...
I've tried changing the head content to text/html, that doesn't work either... can anyone help me out?
<?php
//types, this example creates a jpeg
header("Content-Type: image/jpeg");
//open up the image you want to put text over
$im = imagecreatefromjpeg("$image");
//This writes your text on the image and adds a 3 pixel border
$string = '2005 - ';
$string = $string . $imageDescription;
$textcolor2 = imagecolorallocate($im, 0, 0, 0);
imagestring($im, 2, 11, 12, $string, $textcolor2);
$textcolor = imagecolorallocate($im, 255, 255, 255);
imagestring($im, 2, 10, 11, $string, $textcolor);
$y = imagesy($im);
$x = imagesx($im);
$colorGrey=imageColorAllocate($im, 0, 0, 0);
$i = 0;
while ($i <= 3) {
imageLine($im, $i, $i, $x, $i, $colorGrey);
imageLine($im, 0, $y-($i+1), $x-($i+1), $y-($i+1), $colorGrey);
imageLine($im, $i, $i, $i, $y, $colorGrey);
imageLine($im, $x-($i+1), 0, $x-($i+1), $y-($i+1), $colorGrey);
$i = $i+1;
}
//Creates the jpeg image and sends it to the browser
imagejpeg($im, '', 100);
imagedestroy($im);
?>