dsdsdsd

来源:1-11 习题

魔鬼达人

2015-08-13 18:20

$image = imagecreatetruecolor( 100, 30 );

$bgcolor = imagecolorallocate( $image, 255, 255, 225 );

imagefill( $image, 0, 0, $bgcolor );

    for($i=0;$i<200;$i++){

        $pointcolor = imagecolorallocate($image,rand(50,200),rand(50,200),rand(50,200)); 

        imagesetpixel($image,rand(1,199),rand(1,29),$pointcolor);

        

        }

    header( 'content-type: image/png' );

imagepng( $image );

imagedestroy( $image );


写回答 关注

1回答

  • 念_小桥流水
    2016-01-16 21:50:44

    rand(1,199)???

PHP实现验证码制作

各种形态验证码核心原理与实现技巧,讲解实现过程中的技术难点

37936 学习 · 338 问题

查看课程