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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

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

難度初級(jí)
時(shí)長(zhǎng) 1小時(shí)20分
學(xué)習(xí)人數(shù)
綜合評(píng)分9.80
173人評(píng)價(jià) 查看評(píng)價(jià)
10.0 內(nèi)容實(shí)用
9.8 簡(jiǎn)潔易懂
9.6 邏輯清晰
  • <!DOCTYPEC html> <html> <head> <meta charset = "utf-8"/> <title>確認(rèn)驗(yàn)證碼</title> </head> <form method = "post" ation = "./form.php"> <p>驗(yàn)證圖片:<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()">換一個(gè)?</a></p> <p>請(qǐng)輸入圖片中的內(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>輸入錯(cuò)誤</b></font>'; } exit(); } ?> <!DOCTYPEC html> <html> <head> <meta charset = "utf-8"/> <title>確認(rèn)驗(yàn)證碼</title> </head> <form method = "post" ation = "./form.php"> <p>驗(yàn)證圖片:<image border = "1" src = "./captcha.php?r=<?php rand();?>" width = 100></p> <p>請(qǐng)輸入圖片中的內(nèi)容: <input type = "text" name = "authcode" value = ""/></p> <p><input type= "submit" value = "提交" style = "padding:6px 20px;"></p> </form> </body> </html>
    查看全部
  • 驗(yàn)證碼
    查看全部
    0 采集 收起 來(lái)源:驗(yàn)證碼介紹

    2015-01-24

  • scbzyj 服務(wù)端業(yè)務(wù):寫(xiě)請(qǐng)求的消耗要遠(yuǎn)遠(yuǎn)大于讀請(qǐng)求。 驗(yàn)證碼作用:人機(jī)校驗(yàn)區(qū)分,防灌水。
    查看全部
    2 采集 收起 來(lái)源:驗(yàn)證碼介紹

    2015-01-23

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

    2015-01-20

  • imagettftext imagettftext — 用 TrueType 字體向圖像寫(xiě)入文本 說(shuō)明 array imagettftext ( resource $image , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text ) 使用 TrueType 字體將 指定的 text 寫(xiě)入圖像。
    查看全部
  • <?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實(shí)現(xiàn)動(dòng)態(tài)校驗(yàn)驗(yàn)證碼,即用JS修改圖片的 src,為防止緩存使用隨機(jī)數(shù)
    查看全部
  • bool imagesetpixel ( resource $image , int $x , int $y , int $color ) imagesetpixel() 在 image 圖像中用 color 顏色在 x,y 坐標(biāo)(圖像左上角為 0,0)上畫(huà)一個(gè)點(diǎn)。
    查看全部
  • $image=imagecreatetruecolor(width,height) 生成畫(huà)布 $background=imagecolorallocate($image,250,250,250) 設(shè)置顏色 imagefill($image,0,0,$background) 填充 在header前不能有任何輸出,否則報(bào)錯(cuò) header("content-type=image/png") 設(shè)置格式 imagepng($image) 輸出 imagedestroy($image) 銷(xiāo)毀資源
    查看全部
  • 驗(yàn)證碼服務(wù)的核心技術(shù)分析 a.底圖的實(shí)現(xiàn),并且添加干擾元素--依賴PHP圖片處理庫(kù)GD,詳情:http://php.net/gd b.生成驗(yàn)證內(nèi)容--簡(jiǎn)單的隨機(jī)數(shù)生成,使用PHP函數(shù)mt_rand();隨機(jī)數(shù)字+字母生成,需要ASCII碼理論基礎(chǔ);隨機(jī)中文內(nèi)容生成,需要UTF-8編碼理論基礎(chǔ); c.驗(yàn)證內(nèi)容保存在服務(wù)器端--需要PHP操作Session基礎(chǔ); d.驗(yàn)證內(nèi)容的校驗(yàn)--需要前段Ajax基礎(chǔ);
    查看全部
  • 服務(wù)端性能:寫(xiě)請(qǐng)求的消耗要遠(yuǎn)遠(yuǎn)大于讀請(qǐng)求。 驗(yàn)證碼:人機(jī)校驗(yàn)區(qū)分,防灌水。
    查看全部
    0 采集 收起 來(lái)源:驗(yàn)證碼介紹

    2015-01-20

  • 驗(yàn)證碼的設(shè)計(jì)思路!
    查看全部

舉報(bào)

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

微信掃碼,參與3人拼團(tuán)

微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

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

友情提示:

您好,此課程屬于遷移課程,您已購(gòu)買(mǎi)該課程,無(wú)需重復(fù)購(gòu)買(mǎi),感謝您對(duì)慕課網(wǎng)的支持!