See the service details page for more on the possible values. The following examples return the fully qualified url of an mp3 audio file.
To generate the Captcha code 'abc007' spelt out phonetically, in disguised US English, prefixing audio with the words 'the Captcha is six characters long' set the following values:
$code='abc007'; $mode='phonetic'; $language='US-English'; $obfuscate=TRUE; $prefix=FALSE; $extend=FALSE; $count=TRUE;
$client = new SoapClient('http://captcha.cognable.com/wsdl/');
$captcha_data= array(
'Code' => $code,
'Mode' => $mode,
'Language' => $language,
'Obfuscate' => $obfuscate,
'Prefix' => $prefix,
'Extend' => $extend,
'Count' => $count
);
$mp3url=$client->captcha($captcha_data);
Download nusoap here: NuSOAP Download Page. NuSOAP has slightly different syntax.
require_once('nusoap.php');
$client = new soapclient('http://captcha.cognable.com/wsdl/',true);
$captcha_data= array(
'Code' => $code,
'Mode' => $mode,
'Language' => $language,
'Obfuscate' => $obfuscate,
'Prefix' => $prefix,
'Extend' => $extend,
'Count' => $count
);
$mp3url=$client->call('captcha', array('captcha_data' => $captcha_data));