i tried to make a PHP GD banner like a plugin to make users copy and paste the image link and put in their websites, which worked ok so far for me, the problem is that when i load the image, other page content such as text , etc doesn't show into the browser
here is my php code to draw the image
<?php
header("Content-type: image/png");
$string = $_GET['text']. ' Click Here';
$im = imagecreatefrompng("../../images/banner.png");
$orange = imagecolorallocate($im, 0, 0, 0);
$px = (imagesx($im) - 1.5 * strlen($string)) / 2;
$font = 'verdana.ttf';
imagestring($im,50, $px, 45, $string, $orange);
imagepng($im);
imagedestroy($im);
?>
hint: i put this code at the top of the page to make the header work
now other html code is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>add plugin</title>
</head>
<body>
<h3>Select One or More Plugin to connect your website for your reservation</h3>
<h4>Just A Button</h4>
<br />
<p>Instructions</p>
<p>Copy this code and paste into your website</p>
</body>
</html>
can someone suggest any solution to overcome this problem ?