How to setup the cloud sdk in php?

  • 2.3K Views
  • Last Post 13 June 2012
sureshpegadapelli posted this 12 June 2012

Hi,

I want to know how to set the cloud sdk in php.

and the cloud sdk will work on local server?

Thanks suresh Pegadapelli.

  • Liked by
  • Dmitry Me
Order By: Standard | Newest | Votes
Dmitry Me posted this 13 June 2012

Please refer to PHP sample. You'll have to provide your credentials by setting $applicationId and $password variables, specify the relative path to the images folder and the image file and once that is done you can run the sample using this command line: php -f <path to the sample file>.

Cloud OCR SDK doesn't run on local server, it only runs as the cloud service.

  • Liked by
  • SDK_support
Felix posted this 13 June 2012

Sometimes Curl does not open https URLs, but gives no error.

$url = $arr["resultUrl"]; // This is a https-URL (Line 68 PHP exampel)

My fix: replace line 72 with:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$response = curl_exec($ch);

Dmitry Me posted this 13 June 2012

@sureshpegadapelli: You can call Cloud OCR SDK methods from inside your web server (actually it can be any server or any standalone application with access to the Internet), but the call we go to Cloud OCR SDK servers anyway.

Close