嗮嗮更健康!
<?php
$image = imagecreatetruecolor( 120, 30 );
$bgcolor = imagecolorallocate( $image, 255, 255, 255 );
imagefill( $image, 0, 0, $bgcolor );
// 创建一个循环,循环200次
for($i=0;$i<200;$i++){
$col=imagecolorallocate($image,rand(0,255),rand(0,255),rand(0,255));
imagesetpixel($image,rand(1,99),rand(1,29),$col);
};
for($i=0;$i<3;$i++){
$col=imagecolorallocate($image,rand(0,255),rand(0,255),rand(0,255));
imageline ($image,rand(1,119),rand(1,29), rand(1,119),rand(1,29),$col);
}
$col1=imagecolorallocate($image,rand(0,255),rand(0,255),rand(0,255));
imagearc($image,50, 10, 100, 10, 0, 360, $col1);
imagestring($image,20,0,10,"hello,world!",$col);
header( 'content-type: image/png' );
imagepng( $image );
imagepng($image,'xixi.png');
imagedestroy( $image );