include("identify.php"); load_all("signup"); function signup_image($imgText) { $imgWidth=300; $imgHeight=60; $image = imagecreatetruecolor($imgWidth, $imgHeight); $colorWhite = imagecolorallocate($image, 255, 255, 255); $colorGrey = imagecolorallocate($image, 192, 192, 192); $colorBlack = imagecolorallocate($image, 0, 0, 0); imagefilledrectangle($image, 0, 0, $imgWidth, $imgHeight, $colorWhite); $grid_density = rand(5,13); // Create grid for ($i = 0; $i < $grid_density; $i++) { $colorGrid = imagecolorallocate($image, rand(100,200), rand(100,200), rand(100,200)); imageline($image, $i * ($imgWidth/$grid_density) + (rand(1,4)-2), 0, $i *($imgWidth/$grid_density) + (rand(1,4)-2), $imgHeight, $colorGrid); imageline($image, 0, $i * ($imgHeight/$grid_density) + (rand(1,4)-2), $imgWidth, $i * ($imgHeight/$grid_density) + (rand(1,4)-2), $colorGrid); } // Create border around image imageline($image, 0, 0, 0, $imgHeight, $colorBlack); imageline($image, 0, 0, $imgWidth,0, $colorBlack); imageline($image, $imgWidth-1, 0, $imgWidth-1, $imgHeight-1, $colorBlack); imageline($image, 0, $imgHeight-1, $imgWidth-1, $imgHeight-1, $colorBlack); for ($i = 0; $i < strlen($imgText); $i++) { $textcolor = imagecolorallocate($image, rand(25,200), rand(25,200), rand(25,200)); imagestring($image, 5, 10+($i*25), rand(3,32), substr($imgText,$i,1), $textcolor); } $filename = "graph.jpg"; imagejpeg($image, $filename); imagedestroy($image); return $filename; } ?>