LOGIN / REGISTER    Captcha Solver   Directory Submitters   Article Directory   Links Resources   Community Forums

Captcha Solutions SDKs & Sample Codes

We accept any third-party code or library integrations. Just send us a message here: contact us.

Simple HTML Form Image Upload

										
<form method="post" enctype="multipart/form-data" role="form" action="https://api.captchasolutions.com/solve">
	<input type="file" name="captcha" />
	<input type="hidden" name="p" value="upload" />
	<input type="hidden" name="key" value="[API KEY]" />
	<input type="hidden" name="secret" value="[SECRET KEY]" />
	<input type="submit" name="submit" value="Submit" />
</form>
								

PHP Simple Call Example

										
<?php
	$api_endpoint = 'https://api.captchasolutions.com/solve';
	$captcha_url = 'https://www.captchacreator.com/files/captchac_code.php';
	$api_key = '<YOUR API KEY>';
	$secret_key = '<YOUR SECRET KEY>';
	
	print file_get_contents("$api_endpoint?p=decode&url=$captcha_url&key=$api_key&secret=$secret_key");
?>										
								

PHP SDK Usage Example

										
<?php
	include ("lib/CaptchaSolutions.php");	
	
	$key = "[_YOUR_API_KEY_]"; 
	$secret = "[_YOUR_SECRET_KEY_]";

	$api = new CaptchaSolutions($key, $secret);
	
	// Print your remaining token balance
	print $api->balance();
	
	// Solve an image captcha via URL
	print $api->decode("http://www.captchacreator.com/files/captchac_code.php");	
	
	// Solve Google's NoCaptcha ReCaptcha2
	print $api->nocaptcha("6LcT6wATAAAAAMBYUbtdHChwcLt3kaoBpvICxdDj", "https://www.isnare.com/login.php");	
	
	// Solve text based captchas
	print $api->text("What color is the sky?");	
?>										
								

PHP Curl with Proxy Example

										
<?php
	/****************************************************************************
	*
	* You can use this example with our high-speed dedicated private proxies.
	* See https://www.captchasolutions.com/proxies/
	*
	****************************************************************************/
	
	$post = array(
		'p' => 'upload',
		'key' => '[_YOUR_API_KEY_]',
		'secret' => '[_YOUR_API_SECRET_]',
		'captcha' => '@'.realpath('[_CAPTCHA_IMAGE_FILENAME_]'),
		'out' => 'text'
	);
	
	$proxy = "127.0.0.1:8888";
	
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, 'http://api.captchasolutions.com/solve');
	curl_setopt($ch, CURLOPT_HEADER, FALSE);					
	curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);	
	curl_setopt($ch, CURLOPT_USERAGENT,  "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1a2pre) Gecko/2008073000 Shredder/3.0a2pre ThunderBrowse/3.2.1.8");
	curl_setopt($ch, CURLOPT_POST, TRUE);
	curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: multipart/form-data;"));
	curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE);
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
	curl_setopt($ch, CURLOPT_TIMEOUT, 60);
	curl_setopt($ch, CURLOPT_TCP_NODELAY, TRUE);
	
	curl_setopt($ch, CURLOPT_PROXY, $proxy);
	
	$response = curl_exec($ch);
	curl_close($ch);
	
	print $response;
?>										
								

iMacros Script Example

										
	VERSION BUILD=8820413 RECORDER=FX
	TAB T=1

	ONDOWNLOAD FOLDER=D:\ FILE=captcha.jpg

	TAG POS=1 TYPE=IMG ATTR=HREF:*captcha* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT

	SET !EXTRACT_TEST_POPUP NO
	TAB OPEN
	TAB T=2

	URL GOTO=http://api.captchasolutions.com/x.php
	TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:solve ATTR=NAME:p CONTENT=upload
	TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:solve ATTR=NAME:key CONTENT=YOUR_API_KEY
	TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:solve ATTR=NAME:secret CONTENT=YOUR_SECRET_KEY
	TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:solve ATTR=NAME:captcha CONTENT=D:\captcha.jpg
	TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:solve ATTR=VALUE:Send
	wait seconds=5
	TAG POS=6 TYPE=TD ATTR=* EXTRACT=TXT
	SET !VAR1 {{!EXTRACT}}

	TAB CLOSE
	TAB T=1
									

C#, RUBY & PERL Upload / Decode Function Codes.

Download PERL SDK v1.0 Download RUBY SDK v1.0 Download C# SDK v1.0 Download PHP SDK v1.0
Captcha Solutions Now Solves Google's ReCaptcha2 NoCaptcha The "I'm not a robot" Captcha For Only $2.8 Per 1000 Solves.
Captcha Solutions Has Launched Its Early 2017 Discount Sale! To Avail Go To Pricing Page And Apply This Discount Coupon "CAPTCHA10" For A 10% Discount.