第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

PHP實現(xiàn)驗證碼制作

難度初級
時長 1小時20分
學習人數(shù)
綜合評分9.80
173人評價 查看評價
10.0 內(nèi)容實用
9.8 簡潔易懂
9.6 邏輯清晰
  • <!DOCTYPEC html> <html> <head> <meta charset = "utf-8"/> <title>確認驗證碼</title> </head> <form method = "post" ation = "./form.php"> <p>驗證圖片:<image border = "1" id = "captcha_img" src = "./captcha.php?r=<?php rand()?>" width = "100" height = "30"> <a href = "javascript:void(0)" onclick = "document.getElementById('captcha_img').src = './captcha.php?r='+Math.random()">換一個?</a></p> <p>請輸入圖片中的內(nèi)容: <input type = "text" name = "authcode" value = ""/></p> <p><input type= "submit" value = "提交" style = "padding:6px 20px;"></p> </form> </body> </html>
    查看全部
  • /*for($i=0;$i<4;$i++){ $fontsize = 6; $fontcontent = rand(0,9); $fontcolor = imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120)); $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,29),$pointcolor); } 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 session_start(); $image =imagecreatetruecolor(100,30); $bgcolor=imagecolorallocate($image,255,255,255); imagefill ($image,0,0,$bgcolor); $captch_code = ""; for($i=0;$i<4;$i++) { $fontsize = 6; $data = "abcdefghijklmnopqrstuvwxyz12345678"; $fontcontent = substr($data,rand(0,strlen($data)),1); $captch_code .=$fontcontent; $fontcolor = imagecolorallocate($image,rand(0,120),rand(0,120),rand(0,120)); $x= ($i*100/4)+rand(5,10); $y= rand(5,10); imagestring($image,$fontsize,$x,$y,$fontcontent,$fontcolor); } $_SESSION['authcode'] = $captch_code;
    查看全部
  • <?php if(isset($_REQUEST['authcode'])){ session_start(); if(strtolower($_REQUEST['authcode']) == $_SESSION['authcode']) { echo '<font color = "#0000CC">輸入正確</font>'; }else{ echo '<font color = "CC0000"><b>輸入錯誤</b></font>'; } exit(); } ?> <!DOCTYPEC html> <html> <head> <meta charset = "utf-8"/> <title>確認驗證碼</title> </head> <form method = "post" ation = "./form.php"> <p>驗證圖片:<image border = "1" src = "./captcha.php?r=<?php rand();?>" width = 100></p> <p>請輸入圖片中的內(nèi)容: <input type = "text" name = "authcode" value = ""/></p> <p><input type= "submit" value = "提交" style = "padding:6px 20px;"></p> </form> </body> </html>
    查看全部
  • 驗證碼
    查看全部
    0 采集 收起 來源:驗證碼介紹

    2015-01-24

  • scbzyj 服務端業(yè)務:寫請求的消耗要遠遠大于讀請求。 驗證碼作用:人機校驗區(qū)分,防灌水。
    查看全部
    2 采集 收起 來源:驗證碼介紹

    2015-01-23

  • imagecreatetruecolor — 新建一個真彩色圖像 imagecolorallocate — 為一幅圖像分配顏色 imagefill — 區(qū)域填充 imagesetpixel — 畫一個單一像素 imageline — 畫一條線段 header('content-type: image/png'); imagepng($image); imagedestroy($image);
    查看全部
    0 采集 收起 來源:習題

    2015-01-20

  • imagettftext imagettftext — 用 TrueType 字體向圖像寫入文本 說明 array imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text ) 使用 TrueType 字體將 指定的 text 寫入圖像。
    查看全部
  • <?php session_start(); $table = array( 'pic0'=>'貓', 'pic1'=>'狗', 'pic2'=>'蛇', 'pic3'=>'馬' ); $index = rand(0,3); $value = $table['pic'.$index]; $_SESSION['authcode'] = $value; $filename = dirname(__FILE__).'\\pic'.$index.'.jpg'; $contents = file_get_contents($filename); header('content-type:imege/jpg'); echo $contents;
    查看全部
  • JS實現(xiàn)動態(tài)校驗驗證碼,即用JS修改圖片的 src,為防止緩存使用隨機數(shù)
    查看全部
  • bool imagesetpixel ( resource $image , int $x , int $y , int $color ) imagesetpixel() 在 image 圖像中用 color 顏色在 x,y 坐標(圖像左上角為 0,0)上畫一個點。
    查看全部
  • $image=imagecreatetruecolor(width,height) 生成畫布 $background=imagecolorallocate($image,250,250,250) 設置顏色 imagefill($image,0,0,$background) 填充 在header前不能有任何輸出,否則報錯 header("content-type=image/png") 設置格式 imagepng($image) 輸出 imagedestroy($image) 銷毀資源
    查看全部
  • 驗證碼服務的核心技術(shù)分析 a.底圖的實現(xiàn),并且添加干擾元素--依賴PHP圖片處理庫GD,詳情:http://php.net/gd b.生成驗證內(nèi)容--簡單的隨機數(shù)生成,使用PHP函數(shù)mt_rand();隨機數(shù)字+字母生成,需要ASCII碼理論基礎;隨機中文內(nèi)容生成,需要UTF-8編碼理論基礎; c.驗證內(nèi)容保存在服務器端--需要PHP操作Session基礎; d.驗證內(nèi)容的校驗--需要前段Ajax基礎;
    查看全部
  • 服務端性能:寫請求的消耗要遠遠大于讀請求。 驗證碼:人機校驗區(qū)分,防灌水。
    查看全部
    0 采集 收起 來源:驗證碼介紹

    2015-01-20

  • 驗證碼的設計思路!
    查看全部

舉報

0/150
提交
取消
課程須知
本課程適合PHP初學者或者自學的童鞋們。
老師告訴你能學到什么?
1、如何拆解驗證碼項目 2、PHP的繪圖擴展GD庫的使用 3、如何用GD函數(shù)畫圖與驗證碼內(nèi)容 4、如何用PHP做驗證碼校驗,及動態(tài)校驗 5、怎么實現(xiàn)中文、圖片、視頻驗證碼

微信掃碼,參與3人拼團

微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號

友情提示:

您好,此課程屬于遷移課程,您已購買該課程,無需重復購買,感謝您對慕課網(wǎng)的支持!