Here is my site. I’m trying to make its own testing URL for the moment:
http://boats.instantonlinesuccess.co.uk/boat-names.html
If you look at it you can see what I am trying to do. I’m trying to link the JavaScript to my PHP, so the writing appears with the effects / effect colours / colours. It’s all generated via a PHP script which I’m trying to write.
Here is my PHP:
<?php header("Content-type: image/png");
$string = $_GET['text'];
$currentFont =$_GET['font'];
$currentTextColour = $_GET['colour'];
$currentEffect = $_GET['effect'];
$currentEffectColour = $_GET['effectcolour'];
$im = imagecreatefrompng("images/test.png");
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
//if you exactly know the RGB color indexes//
$rgb = imagecolorexact($im, 0, 0, 0);
//or keep the rgb color by position so at top 0 left 0
$rgb = imagecolorat($im, 0, 0);
imagecolortransparent($im, $rgb);
imagestring($im, 64, $px, 16, $string, $currentTextColour);
imagepng($im); imagedestroy($im);
?>
If you need the JavaScript, then let me know.
You could try changing your first line to this to debug the issue:
header('Content-Type: text/plain');