Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. // 1. Send image to Cloud OCR SDK using processImage call
  2. // 2. Get response as xml
  3. // 3. Read taskId from xml
  4. // To create an application and obtain a password,
  5. // register at http://cloud.ocrsdk.com/Account/Register
  6. // More info on getting your application id and password at
  7. // http://ocrsdk.com/documentation/faq/#faq3
  8. // Name of application you created
  9. $applicationId = 'myapplication';
  10. // Password should be sent to your e-mail after application was created
  11. $password = '420KIcxCGU82cBNk4sdFZFPU/v';
  12. $fileName = '1467031974.jpg';
  13.  
  14. // Get path to file that we are going to recognize
  15. //echo $local_directory=dirname(__FILE__).'/images/'; die;
  16. $local_directory = dirname(__FILE__);
  17. $filePath = '/var/www/html/uploads/' . $fileName;
  18. if (!file_exists($filePath)) {
  19. die('File ' . $filePath . ' not found.');
  20. }
  21. if (!is_readable($filePath)) {
  22. die('Access to file ' . $filePath . ' denied.');
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement