Cách sử dụng Captcha bằng PHP pptx

5 166 0
Cách sử dụng Captcha bằng PHP pptx

Đang tải... (xem toàn văn)

Thông tin tài liệu

 Tên Tut  Viết Tut !  Website"# $#%&  Bắt đầu'()(*()*)+'',( Giới thiệu & Ứng dụng của Captcha :  /0-123"4"5-65789 :;<"="-> ;./? @"67A:BC:DE9;F"2;<"G<HI# : /0-D= 77AA;FB"";.9? JD";@K";"; <L#M /04 712-1 D<5-6D;2N-<: O"-PQ=9.R"F2Q>HA <9 F#M:S1QTFUQ9= V 7B5-6"6?  ;<-4""A-UW90-:DX-3 ./Q9OF <;<"GF-U8 .Y0;<.Y#.Y/-:"6:5QH-?B5-6 .YQ=?-2W9?-;.Y"SB ./Q9"6.Z.O#7A[U FD< U /4JD\SB0M;<"6 P 4RU5HUA;FB5 ]9@3"4"5-6 ^_`W! reCaptcha;<)? &@K;# aVF-6@ Bây giờ bắt đầu thực hiện nhabb  c7-3\I;<DF=-1Wd;>HeH%f; o gWh**JJJ#;#"*-1Wd<<"NP!  e-1Wd[VDF <;>H'WH.VB o D;eHi eH o o o o  c7@-U-jH[".[bb#KYDX-3 < eD9DUkB#l //Import Class + Function require("Captcha.php"); $captcha = array(); $captcha["publickey"] = "6LedxxxxxxxxxWp1N"; $captcha["privatekey"] = "xxxxx-HWMKS5oYgcAvSqy"; $captcha["error"] = ""; //Luu gia tri loi cua captcha $captcha["object"] = null; //* Load Captcha $data['htmlcaptcha'] = recaptcha_get_html($captcha["publickey"], $captcha["error"]);  mUn$data['htmlcaptcha']” Lưu khung nhập reCaptcha  Input reCaptcha sẽ mang tên là : “recaptcha_response_field” Xuất ra khung Captcha : ‘test.php’ <form method="post"> <?php echo $data["htmlcaptcha"]; ?> <br /> <input type="submit" name="ok" value="Submit" /> </form> o;B#;p<HBq;< <?php //Import Class + Function require("Captcha.php"); $captcha = array(); $captcha["publickey"] = "6LedxxxxxxxxxWp1N"; $captcha["privatekey"] = "xxxxx-HWMKS5oYgcAvSqy"; $captcha["error"] = ""; $captcha["object"] = null; //* Load Captcha $data['htmlcaptcha'] = recaptcha_get_html($captcha["publickey"], $captcha["error"]); ?> <form method="post"> <?php echo $data["htmlcaptcha"]; ?> <br /> <input type="submit" name="ok" value="Submit" /> </form> Chạy File sẽ ra kết quả như thế này :  c<DjHYBqW"r:-pHW# &BBstuvWvw!! x suvDyvwztWtBJsuv WHvw st{|c{|uv|{{t}}|vwstuvt;;t~;vw stuvtBBt~;vw!• &LsuvDyvw€Bt ;! x v}[v• suvvwzsuvDyvw€• • ;B x v}v• • •  suvDyvw‚A./@  suvDyvw€Bt ;e"r-pH;<[ o;B#BW<<Bq.B ƒ„ **%";BB…o\ requirev#v!• s zarray!• $captcha["publickey"] = "6LedxxxxxxxxxWp1N"; $captcha["privatekey"] = "xxxxx-HWMKS5oYgcAvSqy"; suvvw zvv•**g; suvDyvw znull• **e"D" ifissetstuvWvw!! x suvDyvwztWtBJsuv WHvw st{|c{|uv|{{t}}|vw stuvt;;t~;vw stuvtBBt~;vw!• if LsuvDyvw€Bt ;! x echo v}[v• suvvwzsuvDyvw€• • else x echo v}v• • • **†g su‡";‡wztt";suvD;WHvwsuvvw!• „€ ƒ&""z"post"€ ƒ„echo suv";vw•„€ ƒD*€ ƒHz"submit""z"ok" ;z"Submit"*€ ƒ*&"€ B"VBq U)D<.Oˆ 4o;&"W[<;p-:DFBq>H3U .U<# ^U)Q9-R=V>NQ"2 V7H|!:-T /#‰ V ˆ.-T /#^.:[jH5BC);DHRD?W:W1!# }J;o;BF h**H"# $h**\\#& <h**Q;#&9DF . //Luu gia tri loi cua captcha $captcha[ "object"] = null; //* Load Captcha $data['htmlcaptcha'] = recaptcha_get_html( $captcha[ "publickey"], $captcha[ "error"]); . mUn$data['htmlcaptcha']” Lưu khung nhập reCaptcha  Input reCaptcha sẽ mang tên là : “recaptcha_response_field” Xuất ra khung Captcha : ‘test .php <form method="post"> < ?php echo. Function require(" ;Captcha. php& quot;); $captcha = array(); $captcha[ "publickey"] = "6LedxxxxxxxxxWp1N"; $captcha[ "privatekey"] = "xxxxx-HWMKS5oYgcAvSqy"; $captcha[ "error"]

Ngày đăng: 05/08/2014, 14:21

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan