Permalink
Browse files

Updating the readme

  • Loading branch information...
1 parent 457710c commit 8173547ac569e8d44028b53ca3a4e8802362d4eb @madnificent committed May 5, 2009
Showing with 21 additions and 1 deletion.
  1. +21 −1 README.textile
View
@@ -1,4 +1,24 @@
h1. cl-recaptcha
-cl-recaptcha is a simple interconnection between recaptcha.net and common-lisp. It can be used for the trivial usage of the recaptcha service.
+cl-recaptcha is a simple interconnection between recaptcha.com and common-lisp. It can be used for the trivial usage of the recaptcha service.
+h2. dependencies
+
+cl-recaptcha require split-sequence and drakma. I currently load it through clbuild (you'll have to add it to wnnp-projects) to handle the dependencies.
+
+h2. usage
+
+The simplest way to use cl-recaptcha is to get a public and private key from recaptcha.com. Set the key in cl-recaptcha, insert the needed code in your site and ask cl-recaptcha for verification. All this should look somewhat like this:
+
+ (setf cl-recaptcha:*private-captcha-key* "your-private-key")
+ (setf cl-recaptcha:*public-captcha-key* "your-publick-key")
+
+In the source of the page, insert a call to challenge where you want to have your recaptcha inserted.
+
+ (challenge)
+
+Assuming you get your post-vars by (get-post-var "varname") and the ip of the user by (get-ip-address), you can check the validity of the entry of the user by running:
+
+ (verify-captcha (get-post-var "recaptcha_challenge_field") (get-post-var "recaptcha_response_field") (get-ip-address))
+
+which will return T on success and nil on failure. The second value it returns tells you something about the reason of failure.

0 comments on commit 8173547

Please sign in to comment.