Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 1. Send image to Cloud OCR SDK using processImage call
- // 2. Get response as xml
- // 3. Read taskId from xml
- // To create an application and obtain a password,
- // register at http://cloud.ocrsdk.com/Account/Register
- // More info on getting your application id and password at
- // http://ocrsdk.com/documentation/faq/#faq3
- // Name of application you created
- $applicationId = 'myapplication';
- // Password should be sent to your e-mail after application was created
- $password = '420KIcxCGU82cBNk4sdFZFPU/v';
- $fileName = '1467031974.jpg';
- // Get path to file that we are going to recognize
- //echo $local_directory=dirname(__FILE__).'/images/'; die;
- $local_directory = dirname(__FILE__);
- $filePath = '/var/www/html/uploads/' . $fileName;
- if (!file_exists($filePath)) {
- die('File ' . $filePath . ' not found.');
- }
- if (!is_readable($filePath)) {
- die('Access to file ' . $filePath . ' denied.');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement