PHPʵÀý£ºÓÃSESSION·½·¨ÊµÏÖÑéÖ¤Âë
index.php(ʵÏÖÊäÈëÑéÖ¤ÂëÒ³Ãæ)´úÂëÈçÏ£º Code´úÂëÈçÏÂ: <html>
<head>
<title>check code</title>
</head>
<body>
<form name=check method=post action=check.php>
<input type=hidden name=init value=1>
ÑéÖ¤Â룺<input type=text name=code maxlength=4 style="width=50px;">
<!--µÃµ½ÑéÖ¤ÂëͼƬ-->
<img src=image.php>
<p>
<input type=submit value="Ìá½»">
</form>
</body>
</html> image.php£¨ÑéÖ¤ÂëÉú³ÉÒ³Ã棩´úÂëÈçÏ£º Code´úÂëÈçÏÂ: <?php
session_start();
srand((double)microtime()*1000000);
$authnum=rand(1000,9999);
session_register("authnum");
header("content-type:image/png");
function creat_image( $width, $height, $authnum)
{
srand((double)microtime()*1000000);
$im = imagecreate( $width, $height);
$black = ImageColorAllocate( $im, 0,0,0);
$white = ImageColorAllocate( $im, 255,255,255);
$gray = ImageColorAllocate( $im, 200,200,200);
imagefill( $im,0,0, $gray);
//½«ËÄλÕûÊýÑéÖ¤Âë»æÈëͼƬ
imag
Ïà¹ØÎĵµ£º
/*
* ¹¦ÄÜ£ºPHP
ͼƬˮӡ (ˮӡ֧³ÖͼƬ»òÎÄ×Ö)
* ²ÎÊý£º
* $product_img ±³¾°Í¼Æ¬£¬¼´ÐèÒª¼ÓˮӡµÄͼƬ£¬ÔÝÖ»Ö§³ÖGIF,JPG,PNG¸ñʽ£»
* $waterPos ˮӡλÖã¬ÓÐ10ÖÖ״̬£¬0ΪËæ»úλÖã»
* &n ......
Ò»´ÎNginx+PHP+MysqlµÄ²¢·¢²âÊÔ¾Àú
Ò»¡¢Ó²¼þ»·¾³
CPU:4ºËIntel(R) Xeon(R) CPU E5504 @ 2.00GHz
6GÄڴ棬120GÓ²ÅÌ
¶þ¡¢Èí¼þ»·¾³
L ......
PHPÊǸöΰ´óµÄweb¿ª·¢ÓïÑÔ£¬Áé»îµÄÓïÑÔ£¬µ«ÊÇ¿´µ½php³ÌÐòÔ±Öܶø¸´Ê¼µÄ·¸µÄһЩ´íÎó¡£ÎÒ×öÁËÏÂÃæÕâ¸öÁÐ±í£¬ÁгöÁËPHP³ÌÐòÔ±¾³£·¸µÄ10ÖдíÎ󣬴ó¶àÊýºÍ°²È«Ïà¹Ø¡£¿´¿´Äã·¸Á˼¸ÖÖ
1.²»×ªÒâhtml entities
Ò»¸ö»ù±¾µÄ³£Ê¶£ºËùÓв»¿ÉÐÅÈεÄÊäÈ루ÌرðÊÇÓû§´ÓformÖÐÌá½»µÄÊý¾Ý£© £¬Êä³ö֮ǰ¶¼Òª×ªÒâ¡£
ech ......
ÀûÓ÷ÉÐÅAPIʵÏÖ¹«Ë¾ÄÚ²¿·¢ËͶÌÐÅ¿ÉÒÔʡϲ»ÉÙÇ®.ÍøÉÏÒ²Óв»ÉÙ·ÉÐÅAPI,µ«¸Ð¾õ²»¿É¿¿,
»¹ÊÇ×Ô¼ºÐ´ÁËÒ»¸ö¼òµ¥µÄAPI.µ÷ÓõØÖ·ÈçÏÂ,²»»á¼Ç¼·ÉÐÅÃÜÂë.
ϲ»¶µÄÅóÓÑ¿ÉÒÔÊÔÊÔ,½áºÏAU3ÓÖдÁ˸öUDF.ÕâÏ·¢¶ÌÐÅ·½±ãºÜ¶àÁË.
http://lab.l4ever.cn/fetion/api/?from=·¢ËÍÊÖ»ú&pw=·ÉÐÅÃÜÂë&to=½ÓÊÕºÅÂë&msg=¶ÌÐÅÄÚÈ ......