Several ways to generate graphic verification codes in PHP_PHP tutorial

WBOY
Release: 2016-07-20 11:16:34
Original
790 people have browsed it

You need to use the php GD library to generate the graphical verification code. If you do not have an account with the GD library, we need to find extension=php_gd2.dll in the php.ini file and remove the previous ";" and then restart the apache or iis environment. ​ foreach(gd_info() as $cate=>$value)
echo "$cate: $ value
";
}else
echo 'You do not have gd extension installed';
?>
If there is return information, it is correct and can be used frequently
Example 1
Example 2
An example of generating verification code developed using PHP, combined with session and GD library extensions (recommended by w3c), which can be easily used in projects. And the style is beautiful
               "green" => 0xFF & ($int >> 0x8),
               "blue" => 0xFF & $int);
}
推荐第二个生成验证码程序代码,最后一个是W3C标准生成的也是利用了php gd库。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440098.htmlTechArticle生成图形验证码需要使用php GD库来生成,如果你没开户GD库我们需要在php.ini文件找到extension=php_gd2.dll 去掉前面的;就行了,然后重启apache 或...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
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!