= IqCaptcha
ubuntu 10.04, sudo apt-get install libmagickwand-devubuntu 11.04, sudo apt-get install libmagick9-dev
ubuntu 12.04, sudo apt-get install graphicsmagick-libmagick-dev-compat
CentOS, yum install ImageMagick-devel
Mac, brew install imagemagick
Pre requisite gem rmagick
- Place captcha background image named(iq_captcha_background.png) in your project's public folder
- in Gemfile,
gem 'iq_captcha' or gem 'iq_captcha', :git => '[email protected]:barek2k2/iq_captcha.git'
and runbundle install
- in routes.rb,
mount IqCaptcha::Engine, :at => '/iq_captcha'
- Now restart your server and browse for testing, for exaample,
http://localhost:3000/iq_captcha
, if the captcha comes then it is OK for the test - To use the captcha in your project's view
<img src="/iq_captcha?t=<%= Time.now.to_i %>&pointsize=25&color_code=ffffff"> <input type="text" name="iq_captcha_result" />
- In controller,
if Captcha::valid?(session,params) # You are human being else # You are not human end
- You are Done
This project rocks and uses MIT-LICENSE.