recognize_audio_captcha

recognize_audio_captcha($filename,$type); - recognize a captcha from an audio file (mp3). For more information, see here (Audio Recaptcha v2 + Audio SolveMedia) (Available from version 4.10.7)

It uses the following object fields :
  • $this->api_key - API key

    The function accepts parameters as input:

  • $filename – path to the audio captcha file (mp3 format)
  • $type – type of audio captcha (0 - Audio Recaptcha v2 , 1 - Audio SolveMedia)

    After testing, the function returns the result of its work to the script :
  • The result of recognition is a captcha string or a code string with an error response:
  • ERROR_KEY_DOES_NOT_EXIST - you used an invalid captcha key in the request
  • ERROR_WRONG_ID_FORMAT - invalid captcha ID, only numbers are accepted
  • ERROR_CAPTCHA_UNSOLVABLE - captcha could not be solved by 5 different employees

    PHP example: rucaptcha->".basename(__FILE__)."
    "; //API key $rucaptcha->api_key = "0123456789abcdef0123456789abcdef"; //1 echo "1.Recognize audio file from ReCaptcha 2:"; echo $rucaptcha->recognize_audio_captcha($debug->get_cur_script_folder()."test \ 80692.mp3", 0); //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("
    rucaptcha.xxxxxxxxx
    ") # API key rucaptcha.api_key = "0123456789abcdef0123456789abcdef" # 1 echo("1.Recognizing audio file from ReCaptcha 2:") echo(rucaptcha.recognize_audio_captcha(debug.get_cur_script_folder() + "test \ 80692.mp3", 0)) # end echo("

    ") # Quit app.quit()
    C# example: Java Script example: