Project

antigate

0.01
No commit activity in last 3 years
No release in over 3 years
Wrapper for Antigate API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Wrapper for Antigate API

Gem recognizes CAPTCHA by means Antigate.

Registration Antigate account

Install

gem install antigate

Usage

Recognize captcha

captcha = Antigate.wrapper(KEY)
captcha.phrase = 0 or 1 (0 default, 1 marks that at captcha 2-4 words)
captcha.regsense = 0 or 1 (0 default, 1 marks that text captcha is case sensitive)
captcha.numeric = 0 or 1 or 2 (0 default, 1 marks that text captcha consists only of numbers, 2 marks that on captcha no digit)
captcha.calc = 0 or 1 (0 default, 1 marks that digit  on captcha should be folded)
captcha.min_len = 0..20 (0 default, minimum length text captcha)
captcha.max_len = 0..20 (0 - unlimited, maximum length text captcha)
recognized = captcha.recognize(URL, EXT)
puts recognized[0] # ID recognized CAPTCHA
puts recognized[1] # Text CAPTCHA

Example

captcha = Antigate.wrapper('660aaf58948bae3fa81362ef71b9ebcc')
captcha.phrase = 1
recognized = captcha.recognize('http://www.google.com/recaptcha/api/image?c=03AHJ_Vuu-Kun_wMo4M8JiWA87K6awfoiUxJCUF9KkQq3tCfyxjYELhHcsIJrcJ_qgqIQQsBw5vWAkpHBqP4VEHv1nwtoAnD5uZvwzHknOFyID4OrX0_6q8QXQ5TwkRn7qBxdt3QdX6D8NvPcFHFHzmEhu1yCJJQfTwQ', 'jpg')
puts recognized[1]

Get balance

puts Antigate.balance(KEY)

Example

puts Antigate.balance('660aaf58948bae3fa81362ef71b9ebcc')