亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP ?? ????? ?? ???? ??

?? ?? ??

? ?? ???

<?php
 
 if(isset($_REQUEST['code']))
 {
     session_start();
     if (strtolower($_REQUEST['code'])==$_SESSION['code'])
     {
         header('Content-type: text/html; charset=UTF8');
         echo '<font color="#0000CC">輸入正確</font>';
     }
     else{
         header('Content-type: text/html; charset=UTF8');
         echo '<font color="#CC0000"><b>輸入錯誤</b></font>';
     }
     exit();
 }
 
 ?>
 <!DOCTYPE html>
 <html>
 <head>
     <meta charset="utf-8"/>
     <title>確認(rèn)驗證</title>
 </head>
 <body>
 <form method="post" action="form.php">
     <p>驗證碼圖片:<img id="captcha_img" border="1" src="captcha-2.php?r=<?php echo rand();?>" width="100" height="30">
 
     </p>
     <p>請輸入圖片的內(nèi)容:<input type="text" name="code" value=""/></p>
     <p><input type="submit" value="提交" style="padding:6px 20px;"></p>
 </form>
 </body>
 </html>

?? ??:

<?php
 
 if(isset($_REQUEST['code']))
 {
     session_start();
     if (strtolower($_REQUEST['code'])==$_SESSION['code'])
     {
         header('Content-type: text/html; charset=UTF8');
         echo '<font color="#0000CC">輸入正確</font>';
     }
     else{
         header('Content-type: text/html; charset=UTF8');
         echo '<font color="#CC0000"><b>輸入錯誤</b></font>';
     }
     exit();
 }
 
 ?>
 <!DOCTYPE html>
 <html>
 <head>
     <meta charset="utf-8"/>
     <title>確認(rèn)驗證</title>
 </head>
 <body>
 <form method="post" action="form.php">
     <p>驗證碼圖片:
         <img src="captcha-2.php" alt="驗證碼,看不清楚,換一張"
          onclick="this.src = this.src + '?' + new Date().getTime();" />
     </p>
     <p>請輸入圖片的內(nèi)容:<input type="text" name="code" value=""/></p>
     <p><input type="submit" value="提交" style="padding:6px 20px;"></p>
 </form>
 </body>
 </html>

html ?? ?? ?? ???? ??? ??? ?? post submit? ?? form.php ??? ?????. ??? captcha-2.php? ????,

onclick="this.src = this.src + '?' + new Date().getTime();

??? ??? ??? ??? ??? ???? ?????.

<?php
 
 if(isset($_REQUEST['code']))
 {
     session_start();
     if (strtolower($_REQUEST['code'])==$_SESSION['code'])
     {
         header('Content-type: text/html; charset=UTF8');
         echo '<font color="#0000CC">輸入正確</font>';
     }
     else{
         header('Content-type: text/html; charset=UTF8');
         echo '<font color="#CC0000"><b>輸入錯誤</b></font>';
     }
     exit();
 }

php ??, SESSION? ?? ??? ?? ??? ???? ???? ?? ??? ???? ??? ??? ??? ???? ??? ??? ?? ?, ?? ??? ??? ???

?? ??? ???? ??? ???????.

???? ??
||
<?php session_start(); $image = imagecreatetruecolor(100,30); $bgcolor = imagecolorallocate($image,255,255,255);//#FFFFFFFFFFFF imagefill($image,0,0,$bgcolor); $captch_code=""; for ($i=0;$i<4;$i++){ $fontsize = 6; $fontcolor = imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120)); $data='abcdefghijklmnopqrstuvwxyz1234567890'; $fontcontent=substr($data,rand(0,strlen($data)),1); $captch_code.="$fontcontent"; $x = ($i * 100/4)+rand(5,10); $y = rand(5,10); imagestring($image,$fontsize,$x,$y,$fontcontent,$fontcolor); } $_SESSION['code']=$captch_code; for($i=0;$i<200;$i++){ $pointcolor = imagecolorallocate($image,rand(50,200),rand(50,200),rand(50,200)); imagesetpixel($image,rand(1,99),rand(1,29),$pointcolor); } for($i=0;$i<5;$i++){ $linecolor = imagecolorallocate($image,rand(60,220),rand(60,220),rand(60,220)); imageline($image,rand(1,99),rand(1,29),rand(1,99),rand(1,29),$linecolor); } header('content-type: image/png'); imagepng($image); //銷毀 imagedestroy($image); ?>