<?php
$sigImage = array("img1.jpg", "img2.jpg"); // Add/remove with the different filenames of you sig backgrounds
// RANDOMIZE BACKGROUND //
// Chooses a background from an array at random for the sig
$sigIndex = rand(0, count($sigImage)-1);
$sigImage = $sigImage[$sigIndex];
// The main image to put the stats over.
$imageExt = explode(".", $sigImage);
if(strtolower($imageExt[1]) == "jpg"){
$image = imagecreatefromjpeg($sigImage);
}elseif(strtolower($imageExt[1]) == "png"){
$image = imagecreatefrompng($sigImage);
}else{
die("Unsupported filetype!");
}
// WRITE OUT THE IMAGE //
header('Content-type: image/jpeg');
imagejpeg($image, NULL, 100);
imagedestroy($image);
?>