*/ /* d = domain */ /* bc = background color */ /* fc = foreground color */ /* s = size */ /* m = mail address */ /* colors in RGB format */ /* errorin saa esille kun kun, kommentoi ulos tuon header("Content-type jne rivin */ $font = "verdana"; $domain = array("b2.fi", "cs.joensuu.fi", "luukku.com", "welho.com", "gmail.com", "cosplay.fi", "hotmail.com", "kemi.fi"); $bgcolor = array( array( 'r' => 204, g => 208, b => 248 ), array( 'r' => 255, g => 255, b => 255 ), array( 'r' => 0, g => 0, b => 0 ), ); $fgcolor = array( array( 'r' => 43, g => 61, b => 135 ), array( 'r' => 0, g => 0, b => 0 ), array( 'r' => 255, g => 255, b => 255 ), ); $size = array(11,10,9); $up_padding = 0; $mailit = array("kyuu", "jkrohns", "ilonamertanen", "reezi90", "helina.turunen", "tour07", "she_ka", "tamperekuplii", "kemi2007", "outi.hyvonen", "animeconv","kirjamessut2007", "animeconv.ohjelma"); header("Content-type: image/png"); $m = intval($_GET["m"]); $fc = intval($_GET["fc"]); $bc = intval($_GET["bc"]); $d = intval($_GET["d"]); $s = intval($$_GET["s"]); if(!$m || $m < 1 || $m > count($mailit)) $m=1; if(!$d || $d < 1 || $d > count($domain)) $d=1; if(!$fc || $fc < 1 || $fc > count($fgcolor)) $fc=1; if(!$bc || $bc < 1 || $bc > count($bgcolor)) $bc=1; if(!$s || $s < 1 || $s > count($domain)) $s=1; $bc--; $fc--; $d--; $s--; $im = @imagecreate(1000,100) or die("Can't initialize new gd image stream"); $background_color = imagecolorallocate($im, $bgcolor[$bc]["r"], $bgcolor[$bc]["g"], $bgcolor[$bc]["b"]); $text_color = imagecolorallocate($im, $fgcolor[$fc]["r"], $fgcolor[$fc]["g"], $fgcolor[$fc]["b"]); $tmp_arr = imagettftext($im, $size[$s], 0, 1, $size[$s]+1+$up_padding, $text_color, $font, $mailit[$m-1]."@".$domain[$d]); $x = $tmp_arr[2]+2; $y = $tmp_arr[3]+2; $im2 = @imagecreate($x,$y) or die("Can't initialize new gd image stream"); $background_color = imagecolorallocate($im, $bgcolor[$bc]["r"], $bgcolor[$bc]["g"], $bgcolor[$bc]["b"]); $text_color = imagecolorallocate($im, $fgcolor[$fc]["r"], $fgcolor[$fc]["g"], $fgcolor[$fc]["b"]); imagecopy($im2, $im, 0, 1, 0, 0, $x, $y); imagepng($im2); imagedestroy($im); imagedestroy($im2); ?>