Now I'm trying to make random favicons. Here is what I've got so far..
Code: Select all
<?php
function randomFavicon() {
$img = imagecreatetruecolor(16, 16); /* Create a blank image */
$bgc = imagecolorallocate($img, rand(1,160), rand(1,160),rand(1,160));
$ec = imagecolorallocate($img, rand(1,160), rand(1,160),rand(1,160));
if( imagefilledellipse($img, 8, 8, 12, 16, $ec) ) {
header("Content-type: image/png");
imagepng($img);
return $img;
} else ??
?>