Ensinnäkin, hikoile, ja joku muutti Qaptchan nimen tällä kertaa Zipper Verification Codeksi, sanaton + sanaton
Jotkut ihmiset kysyivät silti, miten tätä voisi viritellä, ja juuri sopivasti he muuttivat sen ja laittoivat asp.net
Kirjoitin aiemmin Qaptchan konfigurointiohjeista php:ssä, klikkaa Portal. Aloitetaan asp.net käytön konfigurointi
1. Mene viralliselle verkkosivustolle lataamaan uusin versio, latasin version 2.6, nykyinen aika on 22.6.2011,
2. Mene jqueryn viralliselle verkkosivustolle lataamaan jquery1.6, joka on myös sijoitettu avattavalle polulle.
3. Kirjoita staattinen testisivu, index.html, nähdäksesi vaikutuksen
- <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>
Kopioi koodi 4. Kirjoita QapTcha.jquery.js uudelleen
Löydä sijainti alta
- <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>
Kopioi koodi Muutos
- <font color="#0000ff">$.post("server.aspx",{
- action : '30c.org'
- },
- function(data) {
- if(data=="1")</font>
Kopioi koodi 5. Kirjoita server.aspx
Avaa server.aspx.cs ja kirjoita alla oleva koodi
- <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>
Kopioi koodi 6. Hanki IIS- tai kehityspalvelin testaamaan sitä, mene nukkumaan ja huomaa, että pieniä bugeja on vielä tänään, juuri korjattu, ja voit jo ajaa
|