<?php
if (isset($_GET['submit']))
{
header("Content-type: image/png");
$im = @imagecreate(100, 50)
or die();
$b_red = "$back[0]";
$b_green = "$back[1]";
$b_blue = "$back[2]";
$t_red = "$text[0]";
$t_green = "$text[1]";
$t_blue = "$text[2]";
$background_color = imagecolorallocate($im, hexdec($b_red), hexdec($b_green), hexdec($b_blue));
$text_color = imagecolorallocate($im, hexdec($t_red), hexdec($t_green), hexdec($t_blue));
imagestring($im, 3, 5, 5, $_GET['t'], $text_color);
imagepng($im);
imagedestroy($im);
}
else
{
echo '<form method="get" action="">
<input type="text" size="6" maxlength="6" name="b"> Background Color
<p>
<input type="text" size="6" maxlength="6" name="b1"> Text Color
<p>
<input type="text" name="t">Text<br>
<input type="submit" name="submit">
</form>';
}
?>
can someone help me get the colors to work?
www.gettodachoppa.com/tester.php doesn't work just yet.