우선, 한 번 땀 흘렸는데, 이번에는 누가 Qaptcha 이름을 Zipper Verification Code로 바꿨어요, 말문이 막혔어요 + 말문이 막혔죠
몇몇 사람들은 여전히 이 장치를 어떻게 만지작거리냐고 물었고, 마침내 그 장치를 바꾸어 asp.net 에 넣었습니다
전에 php로 Qaptcha 설정 방법에 대해 쓴 적이 있으니, 포털을 클릭해 주세요. asp.net 사용 설정을 시작해 봅시다
1. 공식 웹사이트에 접속해 최신 버전을 다운로드하세요. 저는 2.6을 다운로드했고, 현재 시점은 2011-06-22입니다.
2. jquery 공식 웹사이트에 접속해 jquery1.6을 다운로드하세요. 이 역시 언지핑 경로에 위치해 있습니다
3. 정적 테스트 페이지, 즉 index.html을 작성하여 효과를 확인한다
- <font color="#0000ff"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Pluggin QapTcha : captcha system with jQuery</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" href="jquery/QapTcha.jquery.css" type="text/css" />
- <scrip去掉t type="text/javascrip去掉t" src="jquery/jquery-1.6.1.min.js"></scrip去掉t>
- <scrip去掉t type="text/javascrip去掉t" src="jquery/jquery-ui.js"></scrip去掉t>
- <scrip去掉t type="text/javascrip去掉t" src="jquery/jquery.ui.touch.js"></scrip去掉t>
- <scrip去掉t type="text/javascrip去掉t" src="jquery/QapTcha.jquery.js"></scrip去掉t>
- </head>
- <body>
- <div id="main30corgDiv">
- <h1>QapTcha 2.5 样例</h1>
- <form method="post" action="http://blog.30c.org">
- <fieldset>
- <label>帐号</label> <input type="text" name="userName" />
- <label>密码</label> <input type="text" name="userPwd" />
- <div id="QapTcha"></div>
- <input type="submit" name="submit" value="登录" />
- </fieldset>
- </form>
- </div>
- <scrip去掉t type="text/javascrip去掉t">
- $(document).ready(function(){
- $('#QapTcha').QapTcha({disabledSubmit:false});
- });
- </scrip去掉t>
- </body>
- </html></font>
코드 복사 4. QapTcha.jquery.js 다시 쓰기
아래에서 위치를 확인하세요
- <font color="#0000ff">// set the SESSION iQaptcha in PHP file
- $.post("wp-includes/qaptcha/php/Qaptcha.jquery.php",{
- action : 'qaptcha'
- },
- function(data) {
- if(!data.error)</font>
코드 복사 변화
- <font color="#0000ff">$.post("server.aspx",{
- action : '30c.org'
- },
- function(data) {
- if(data=="1")</font>
코드 복사 5. server.aspx 쓰기
server.aspx.cs을 열고 아래 코드를 작성해 보세요
- <font color="#0000ff">protected void Page_Load(object sender, EventArgs e)
- {
- Session["check"] = false;
- if (Request.Form["action"] == "30c.org")
- {
- Session["check"] = true;
- Response.Write("1");
- }
- else
- Response.Write("0");
- Response.End();
- }</font>
코드 복사 6. IIS나 개발 서버를 설치해 테스트하고, 잠자리에 들면 아직도 작은 버그가 남아 있고, 방금 수정되어 이미 실행할 수 있습니다
|