recognize_captcha

recognize_captcha($filepath,$type); – recognize the image from disk as a captcha

This command is intended for testing the recognition of captcha texts that you use on your sites. This command may take some time to complete, especially for complex captchas. The command has the following parameters:

  • $filepath – path to the image file. This can be either a relative (relative to the script folder) or an absolute path to the image file, and almost all image file formats are supported.
  • $type – captcha type, which can be from 1 to 10. Currently, the following types of captchas are supported:

  • Type 1: (100%)
    1 type of recognized captcha
    1 type of recognized captcha
  • Type 2: (100%)
    2 recognized captcha type
    2 recognized captcha type
  • Type 3: (100%)
    3 recognized captcha type
    3 recognized captcha type
  • Type 4: (97%)
    4 recognized captcha type
    4 recognized captcha type
  • Type 5: (for example, this type uses paypal) (85%)
    5 recognized captcha type
    5 recognized captcha type
  • Type 6: (for example, this type uses phpbb) (95%)
    6 recognized captcha type
    6 recognized captcha type
  • Type 7: (91%)
    7 recognized captcha type
    7 recognized captcha type
  • Type 8: (for example, this type uses vbulletin) (100%)
    8 recognized captcha type
    8 recognized captcha type
  • Type 9: (for example, this type uses xanga) (45%)
    9 recognized captcha type
    9 recognized captcha type
  • Type 10: (scode and similar) (Available from version 4.0.8) (100%)
    10 recognized captcha type
    10 recognized captcha type
    10 recognized captcha type
  • Type 100: OCR recognition of any undistorted text (Available from version 4.6.50) (the percentage of recognition depends on the text)
    100 recognized captcha type
    100 recognized captcha type
    100 recognized captcha type
  • Type 101: OCR recognition of any undistorted text - in the form of numbers(Available since version 4.9.0) (the percentage of recognition depends on the text)
    101 recognized captcha type
    101 recognized captcha type

    (command introduced since version 4.0.0)

    When executed, the command returns the captcha as a string with the captcha, or <false> if the captcha was not recognized. (string)

    well, any other types of captchas are available, which can be recognized by automated captcha recognition systems – anticapcha and captchabot:
    recognize_by_anticaptcha – recognize captcha images via anti-captcha
    recognize_by_captchabot – recognize captcha images via captchabot


    PHP example: image->".basename(__FILE__)."
    "; //anticaptcha key $key = ""; //1 echo "1.Let's go to the polygon:"; echo $browser->navigate("http://humanemulator.net/poligon/image.html")."
    "; //2 echo "2.Recognize captcha using antigate.com service:"; echo $image->recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", $key); //3 echo "3.Recognize a captcha using the antigate.com service in a zero frame:"; echo $image->recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", $key, "http://antigate.com", true, 5,120,0,0,0,0,0,0, 0); //4 echo "4.Recognize a captcha using antigate.com service in a non-existent frame:"; if(!$image->recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", $key, "http://antigate.com", true, 5,120,0,0,0,0, 0.100500)) echo "no such frame
    "; //end echo "

    "; //Quit $app->quit(); ?>
    Python example: # Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7010" from xweb_human_emulator import * # Start echo("
    image.xxxxxxxxx
    ") # anticaptcha key key = "" # 1 echo("1.Let's go to the polygon:") echo(browser.navigate("http://www.humanemulator.net/poligon/image.html"), "
    ") # 2 echo("2.Recognize captcha using antigate.com service:") echo(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key)) # 3 echo("3.Recognize a captcha using the antigate.com service in a zero frame:") echo(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key, "http://antigate.com", true, 5,120,0,0,0,0,0,0,0)) # 4 echo("4.Recognize captcha using antigate.com service in a non-existent frame:") if not image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key, "http://antigate.com", true, 5,120,0,0,0,0,0,0,100500): echo("no such frame
    ") # end echo("

    ") # Quit app.quit()
    C# example: #region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program: XHEScript { static void Main(string [] args) { //init XHE server = "127.0.0.1:7010"; InitXHE(); //Start echo("
    image.recognize_by_anticaptcha
    "); //anticaptcha key string key = ""; //1 step echo("1.Let's go to the polygon:"); echo(browser.navigate("www.humanemulator.net/poligon/image.html") + "
    "); //step 2 echo("2.Recognize captcha using antigate.com service:"); echo(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key) + "
    "); //step 3 echo("3.Recognize the captcha using the antigate.com service in a zero frame:"); echo(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key, "http://antigate.com", true, 5,120, false, false, false, 0,0, "0 ", false) +"
    "); //step 4 echo("4.Recognize the captcha using the antigate.com service in a non-existent frame:"); if(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key, "http://antigate.com", true, 5,120, false, false, false, 0,0, "100500 ") ==" false ") echo("no such frame
    "); //end echo("

    "); app.quit(); } }
    Java Script example: //connect the object to control the emulator, if not already connected xhe_host = "127.0.0.1:7010"; echo = require("../../../Templates JS/xweb_human_emulator.js"); //Start echo("
    image.recognize_by_anticaptcha
    "); //anticaptcha key key = ""; //1 step echo("1.Let's go to the polygon:"); echo(browser.navigate("http://www.humanemulator.net/poligon/image.html") + "
    "); //step 2 echo("2.Recognize captcha using antigate.com service:"); echo(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key)); //step 3 echo("3.Recognize the captcha using the antigate.com service in a zero frame:"); echo(image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key, "http://antigate.com", true, 5,120,0,0,0,0,0,0,0) ); //step 4 echo("4.Recognize the captcha using the antigate.com service in a non-existent frame:"); if(!image.recognize_by_anticaptcha("images/captcha", "c: \ 1.jpg", key, "http://antigate.com", true, 5,120,0,0,0,0,0,0,100500 )) echo("no such frame
    "); //end echo("

    "); //Quit app.quit();