-
驗證碼服務的核心技術分析(技術依賴)查看全部
-
驗證碼:屏蔽機器請求,保障業務不受機器提交請求干擾查看全部
-
圖片與視頻驗證碼查看全部
-
<?php header('content-type:text/html;charset=utf-8'); if(isset($_REQUEST['authcode'])){ session_start(); if(strtolower($_REQUEST['authcode']) == $_SESSION['authcode']){ echo '<font color="#0000cc">輸入正確</font>'; }else{ echo '<font color="#0000cc">輸入錯誤</font>'; } exit(); } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>驗證碼確認</title> </head> <body> <form method="post" action="./form.php"> <p>驗證碼圖片:<img border = "1" src="./captcha.php?r=<?php echo rand();?>"width:100px,height:100px" /></p> <p>請輸入驗證碼內容:<input type="text" name="authcode" value="" /></p> <p> <input type="submit" value="提交" /></p> </form> </body> </html>查看全部
-
javascript:void(0);方法的使用查看全部
-
<?php //1、創建一個真空彩色圖像 $image = imagecreatetruecolor(100,30); //2、為圖像分配顏色 $bgcolor = imagecolorallocate($image,255,255,255); //3、填充圖像 imagefill($image,0,0,$bgcolor); //4、在圖像中添加隨機數字 for($i=0;$i<4;$i++){ $fontsize=6; $fontcolor = imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120)); $fontcontent = rand(0,9); $x = ($i*100/4)+rand(5,10); $y = rand(5,10); imagestring($image,$fontsize,$x,$y,$fontcontent,$fontcolor); } //增加干擾元素 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,99),rand(1,99)); } //增加線干擾 for($i=0;$i<3;$i++){ $linecolor = imagecolorallocate($image,rand(80,200),rand(80,200),rand(80,200)); imageline($image,rand(1,99),rand(1,29),rand(1,99),rand(1,29),$linecolor); } header('content-type:image/png'); imagepng($image); imagedestroy($image); ?>查看全部
-
<?php /*php之驗證制作*/ //1、創建一個真空彩色圖像 $image=imagecreatetruecolor(100,30); //2、為圖像分配顏色 $bgcolor=imagecolorallocate($image,255,255,255); //3、填充圖像 imagefill($image,0,0,$bgcolor); //4、在圖像中添加隨機數字 $code=''; $content=''; for($i=0;$i<4;$i++){ $fontsize=20; $code=rand(0,9); $fontcolor=imagecolorallocate($image,0,0,0); $x=$i*(100/4)+rand(5,10); $y=rand(5,15); $content.=$code; imagestring($image,$fontsize,$x,$y,$code,$fontcolor); } //增加干擾元素 for($i=0;$i<400;$i++){ $pointcolor=imagecolorallocate($image,rand(0,200),rand(0,200),rand(0,200)); imagesetpixel($image,rand(0,100),rand(0,30),$pointcolor); } session_start(); $_SESSION["content"]=$content; header('content-type:image/png'); imagepng($image); imagedestroy($image);查看全部
-
$filename=dirname(__FILE__).'\\pic'.$index.'.jpg'; //獲取當前目錄的地址,加上文件后綴,找到文件; $contents=file_get_contents($filename);//獲取$filename文件; header('content-type:image/jpg'); echo $contents;//打印$filename文件;查看全部
-
驗證碼的動態校驗 使用js實現動態校驗驗證碼查看全部
-
通過SEESSION存儲驗證信息查看全部
-
實現字母驗證碼查看全部
-
給驗證碼添加噪點干擾查看全部
-
20170330查看全部
-
在服務端業務時,寫請求的消耗遠遠大于讀請求查看全部
-
一個漢字占三個字符查看全部
舉報
0/150
提交
取消