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 an image captcha via upload */
	print $api->upload("C:\PATH\TO\YOUR\CAPTCHA\LIKE\THIS\captcha.png");
	
	/* Solve an audio captcha */
	print $api->audio("C:\PATH\TO\YOUR\AUDIO\CAPTCHA\LIKE\THIS\audio.mp3");	
	
	/* 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;
?>										
								

Python Example

										
	#!/usr/bin/env python
	 
	import requests
	 
	api_url="http://api.captchasolutions.com/solve"
	api_key="[_YOUR_API_KEY_]"
	api_secret="[_YOUR_API_SECRET_]"
	 
	# FUNCTION TO GET BALANCE (balance)
	def get_balance():
		global api_url,api_key,api_secret;
 
		data = {"p": "balance",
			"key": api_key,
			"secret": api_secret}
 
		request = requests.post(api_url, data)
 
		return float(request.content)
	# FUNCTION TO GET BALANCE (balance)
	 
	# FUNCTION TO UPLOAD AND SOLVE CAPTCHA (upload)
	def solve(captcha_image=""):
		global api_url,api_key,api_secret;

		data = {"p": "upload",
			"key": api_key,
			"secret": api_secret,
			"out": "text"}

		files={'captcha': open(captcha_image, 'rb')}

		request = requests.post(api_url,files=files,data=data)

		answer = request.content

		return answer
	# FUNCTION TO UPLOAD AND SOLVE CAPTCHA (upload)
	 
	# USAGE OF THE FUNCTIONS
	balance = get_balance()
	print(balance)
	 
	solved=solve("/PATH/TO/YOUR/captcha.png")
	print(solved)		
								

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 "CAPTCHA5" For A 5% Discount.