How to draw a box with random colors as an image in PHP

1 Answer

0 votes
<?php
$image = imagecreate(300, 300);
$rnd = imagecolorallocate($image, rand(0, 256), rand(0, 256), rand(0, 256));
header("Content-Type: image/png");
imagepng($image);
?>


answered Apr 23, 2014 by avibootz
...