First of all, sweat one, and someone changed the name of Qaptcha to Zipper Verification Code this time, speechless + speechless
Some people still asked how to tinker with this thing, and just in time for some time, they changed it and put it in the asp.net
I wrote about the configuration instructions of Qaptcha in php before, please click Portal. Let's start configuring the use of asp.net
1. Go to the official website to download the latest version, I downloaded 2.6, the current time is 2011-06-22,
2. Go to the jquery official website to download jquery1.6, which is also placed in the unzipped path
3. Write a static test page, a index.html, to see the effect
- <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>
Copy code 4. Rewrite QapTcha.jquery.js
Find the location below
- <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>
Copy code Change
- <font color="#0000ff">$.post("server.aspx",{
- action : '30c.org'
- },
- function(data) {
- if(data=="1")</font>
Copy code 5. Write server.aspx
Open the server.aspx.cs and write the code below
- <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>
Copy code 6. Get an IIS or development server to test it, go to bed and find that there are still some small bugs today, just corrected, and you can already run
|