Where is the code for the verification code? Copy and run. I typed most of the code, but at the end, maybe I didn't finish the training. An error occurred. Undefined method.
。水波不清
。水波不清 2019-06-09 19:53:43
0
0
1048

<?php

check_codo();

//$img = imagecreate($width,$height);//Create a canvas and pass in two variables width and height

function check_codo($width = 100,$height = 50,$num = 4, $type = 'jpeg'){

$img = imagecreate($width, $height);

$string = '';

for ($i = 0;$i < $num;$i ) {

$rand = mt_rand(0,2) ;

switch ($rand) {

case 0:

$ascll = mt_rand(48,57);//0-9

break ;

case 1:

$ascll = mt_rand(65,90);//A-Z

break;

case 2:

$ascll = mt_rand(97,122);//a-z

break;

}

$string = sprintf('$c',$ascll);

}

//Background color

imagefilledrectangle($img, 0, 0, $width, $height, randBg($img));

/ /Interference element

for ($i=0; $i < 50; $i ) {

imagesetpixel($img, mt_rand(0,$width),mt_rand(0,$ height),randPix($img));

# code...

}

//Writing

for ($i=0; $i < $num; $i ) {

$x = floor($width / $num) * $i 2;

}


}

?>


。水波不清
。水波不清

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!