bsp; $colorRandom = mt_rand(0,sizeof($colorList)-1); imagesetpixel($image, rand()%70 , rand()%15 , $colorList[$colorRandom]); } // 添加干扰线 for($k = 0; $k < 3; $k++) { $colorRandom = mt_rand(0, sizeof($colorList)-1); // $todrawline = rand(0,1); $todrawline = 1; if($todrawline) { imageline($image, mt_rand(0, $board_width), mt_rand(0,$board_height), mt_rand(0,$board_width), mt_rand(0,$board_height), $colorList[$colorRandom]); } else { $w = mt_rand(0,$board_width); $h = mt_rand(0,$board_width); imagearc($image, $board_width - floor($w / 2) , floor($h / 2), $w, $h, rand(90,180), rand(180,270), $colorList[$colorRandom]); } } imagegif($image); imagedestroy($image); $imagedata[] = ob_get_contents(); ob_clean(); ++$i; } $gif = new GIFEncoder($imagedata); Header (''Conte