
get it so it says, "High6, funky colors man."(may need to refresh a few times). u will notice half is lines and half isnt well im running into a problem where it stops creating lines after awhile. anyone know y?
<?php
$cho = rand(0,1);
if ($cho == 0){
$l = 500;
$w = 120;
$im = imagecreate($l,$w);
$background_color = imagecolorallocate($im, 255, 255, 255);
for ($i = 0; $i < $w; $i++) {
$ran1 = rand(0,255);
$ran2 = rand(0,255);
$ran3 = rand(0,255);
$wc = ImageColorAllocate ($im, $ran1, $ran2, $ran3);
imageline($im,0,$i,500,$i,$wc);
}
header("Content-Type: image/jpeg");
Imagejpeg($im,'',100);
ImageDestroy ($im);
}
else
{
//THIS IS THE ONE
$l = 500;
$w = 120;
$im = imagecreate($l,$w);
$background_color = imagecolorallocate($im, 255, 255, 255);
for ($i = 0; $i < $l; $i++) {
$ran1 = rand(0,255);
$ran2 = rand(0,255);
$ran3 = rand(0,255);
$wc = ImageColorAllocate ($im, $ran1, $ran2, $ran3);
imageline($im,$i,0,$i,120,$wc);
}
$wc = ImageColorAllocate ($im, 0, 0, 0);
imagestring($im,3,260,60,"High6, Funky colors man.",$wa);
header("Content-Type: image/jpeg");
Imagejpeg($im,'',100);
ImageDestroy ($im);
}
?>
ignore the top code thats just for creating horizontal lines.
thanks in advance, high6
Edited by high6, 20 March 2006 - 10:36 PM.
