PHP code example of imagetyperzapi / imagetyperzapi

1. Go to this page and download the library: Download imagetyperzapi/imagetyperzapi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

imagetyperzapi / imagetyperzapi example snippets


$params = array();
$params['domain'] = 'your_domain';
$params['challenge'] = 'challenge_here';
$params['gt'] = 'gt_here';
// $params['api_server'] = 'api.geetest.com';  // - geetest domain - optional
// $params['proxy'] = '126.45.34.53:123';  // - optional
// $params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // optional
$captcha_id = $i->submit_geetest($params);

$params = array();
$params['domain'] = 'https://example.com';
$params['geetestid'] = '647f5ed2ed8acb4be36784e01556bb71';
$captcha_id = $i->submit_geetest_v4($params);

$params = array();
$params['page_url'] = 'https://your-site.com';
$params['sitekey'] = '1c7062c7-cae6-4e12-96fb-303fbec7fe4f';
//$params['invisible'] = '1';  // if captcha is invisible - optional

// domain used in loading of hcaptcha interface, default: hcaptcha.com - optional
// $params['domain'] = 'hcaptcha.com';
    
// extra parameters, useful for enterprise
// submit userAgent from requests too, when this is used
// $params['HcaptchaEnterprise'] = array(
//       "rqdata" => "take value from web requests"
//  );

//$params['proxy'] = '126.45.34.53:123';  // - optional
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
$captcha_id = $i->submit_hcaptcha($params);

$params = array();
$params['page_url'] = 'https://your-site.com';
$params['sitekey'] = 'Fme6hZLjuCRMMC3uh15F52D3uNms5c';
//$params['proxy'] = '126.45.34.53:123';  // - optional
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
$captcha_id = $i->submit_capy($params);

$params = array();
$params['page_url'] = 'https://tiktok.com';	
$params['cookie_input'] = 's_v_web_id:verify_kd6243o_fd449FX_FDGG_1x8E_8NiQ_fgrg9FEIJ3f;tt_webid:612465623570154;tt_webid_v2:7679206562717014313;SLARDAR_WEB_ID:d0314f-ce16-5e16-a066-71f19df1545f;';
//$params['proxy'] = '126.45.34.53:123';  // - optional
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
$captcha_id = $i->submit_tiktok($params);

$params = array();
$params['page_url'] = 'https://your-site.com';
$params['sitekey'] = '11111111-1111-1111-1111-111111111111';
$params['s_url'] = 'https://api.arkoselabs.com';
$params['data'] = '{"a":"b"}';
//$params['proxy'] = '126.45.34.53:123';  // - optional
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
$captcha_id = $i->submit_funcaptcha($params);

$params = array();
$params['page_url'] = 'https://your-site.com';
$params['sitekey'] = '0x4ABBBBAABrfvW5vKbx11FZ';
//$params['domain'] = 'challenges.cloudflare.com';         // domain used in loading turnstile interface, default: challenges.cloudflare.com - optional
//$params['action'] = 'homepage';                          // used in loading turnstile interface, similar to reCAPTCHA - optional
//$params['cdata'] = 'your cdata';                         // used in loading turnstile interface - optional
//$params['proxy'] = '126.45.34.53:123';  // - optional
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
$captcha_id = $i->submit_turnstile($params);

$params = array();
$params['template_name'] = 'Login test page';
$params['sitekey'] = '1c7062c7-cae6-4e12-96fb-303fbec7fe4f';
$params['pageurl'] = 'https://imagetyperz.net/automation/login';
$params['variables'] = array(
        "username" => "abc",
        "password" => 'paZZW0rd'
);
//$params['proxy'] = '126.45.34.53:123';  // - optional
//$params['user_agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0'; // - optional
$captcha_id = $i->submit_task($params);

$i->task_push_variables($captcha_id, array(
            "twofactor_code" => "39283"
));

$captcha_id = $i->submit_recaptcha($params);
echo "Waiting for captcha to be solved...\n";
$response = null;
while($response === null) {
    sleep(10);
    // works any type of captcha, here showing with recaptcha submission
    $response = $i->retrieve_response($captcha_id);
}
echo "Response: ";
var_dump($response);
 php
 php
// get access token from: http://www.imagetyperz.com/Forms/ClientHome.aspx
$access_token = 'your_access_token_here';
$i = new ImagetyperzAPI($access_token);
 php
$balance = $i->account_balance();
echo $balance;
 php
$i = new ImagetypersAPI($access_token, 123);      // use affiliateid
 php
$i = new ImagetypersAPI($access_token, 123, 60);      // use affiliateid
 php
$i->set_captcha_bad($captcha_id);