I have a system that works, but I was wondering if there was a simpler way of choosing a random phrase to make the image out of... here is what I am using:
<?php
$rand = rand(1, 6);
if($rand == 1){
$text = 'Use PHP!';
} else if($rand == 2){
$text = 'OMG! LOOL!';
} else if($rand == 3){
$text = 'There can be only one true yuri';
} else if($rand == 4){
$text = 'Fwapeh goodness';
} else if($rand == 5){
$text = 'Monkeys will take over!';
} else if($rand == 6){
$text = 'BOWUUUUUUUUUUU!';
}
$height = 30; //h
$width = 300; //w
$im = ImageCreate($width, $height); //make it
$txt = ImageColorAllocate ($im, 0, 0, 0); //black
$bg = ImageColorAllocate ($im, 203, 203, 203); //greyish to match website background color
ImageFill($im, 0, 0, $bg); //fill bg with the greyish
ImageString($im, 5, 5, 6, "$text", $txt); //write the text
header ('Content-type: image/png'); //mime type
ImagePng ($im); //send it to the browser
ImageDestroy($im); //DIEEEEEEE
?>
I was thinking about arrays, but I dont know how I would do that...
thanks if you can help me.