function check500($num)
{if ($num >= 500)
{return 500;}
else
{return $num;}}
$quotes = array(
'Quote 1 is this.',
'Quote 2 is this.',
'Quote 3 is this.'
)
$lines = explode("n", wordwrap(('"' . $quotes[array_rand($quotes)] . '"'),
80, "n"))
for ($i = 0, $long = 0; $i < count($lines) $i++)
{ if (strlen($lines[$i]) > $long)
{$long = strlen($lines[$i])}}
$im = imagecreate(check500($long * 6 + 9), check500(count($lines) * 17 +
3))
$background = imagecolorallocate($im, 0, 0, 0)
$text = imagecolorallocate($im, 255, 255, 255)
imagefill($im, 0, 0, $background)
for ($i = 0, $l = 3; $i < count($lines) $i++, $l += 17)
{imagestring($im, 2, 5, $l, $lines[$i], $text)}
imagerectangle($im, 0, 0, (imagesx($im) - 1), (imagesy($im) - 1), $background)
imagerectangle($im, 1, 1, (imagesx($im) - 2), (imagesy($im) - 2), $text)
header('Content-Type: image/png')
imagepng($im)
imagedestroy($im)
?>
{if ($num >= 500)
{return 500;}
else
{return $num;}}
$quotes = array(
'Quote 1 is this.',
'Quote 2 is this.',
'Quote 3 is this.'
)
$lines = explode("n", wordwrap(('"' . $quotes[array_rand($quotes)] . '"'),
80, "n"))
for ($i = 0, $long = 0; $i < count($lines) $i++)
{ if (strlen($lines[$i]) > $long)
{$long = strlen($lines[$i])}}
$im = imagecreate(check500($long * 6 + 9), check500(count($lines) * 17 +
3))
$background = imagecolorallocate($im, 0, 0, 0)
$text = imagecolorallocate($im, 255, 255, 255)
imagefill($im, 0, 0, $background)
for ($i = 0, $l = 3; $i < count($lines) $i++, $l += 17)
{imagestring($im, 2, 5, $l, $lines[$i], $text)}
imagerectangle($im, 0, 0, (imagesx($im) - 1), (imagesy($im) - 1), $background)
imagerectangle($im, 1, 1, (imagesx($im) - 2), (imagesy($im) - 2), $text)
header('Content-Type: image/png')
imagepng($im)
imagedestroy($im)
?>
replace
quote 1 is this
quote 2 is this
quote 3 is this
with the random sext you want it to say
to add more quotes add this and change the text
'Quote 3 is this.'
