v1.0.1-alpha
1.0.1.0-alpha
MIT
The Requires
by Julius Kanlapan
The perfect OCR receipt scanning API for developers, utilizing state-of-the-art receipt optical character recognition. Technology designed from the ground up for receipt recognition and data extraction., (*2)
Tab Scanner is the world's first truly accurate check and receipt scanning technology. It utilises a highly crafted OCR system with state-of-the-art AI to ensure robust and reliable data extraction at lightning speeds. - Highly accurate data extraction - Sub-second processing speeds - Cross-platform API support - Easily integrates with your software - Flexible pricing plans, (*3)
This is an official PHP development kit for Tab Scanner API. For more information about Tab Scanner API please visit https://www.tabscanner.com, (*4)
The recommended way to install Tab Scanner PHP SDK is through Composer., (*5)
$ composer require tabscanner/phpsdk:1.0.2
Visit Tab Scanner Admin for your API key, (*6)
Note: The upload API can accept one of the following parameter: - array - single HTTP File Upload variable ($_FILES) (for array of files see upload_multiple method) - string - file path (used for fopen function) - object - a Laravel request file object https://laravel.com/docs/5.6/requests#files, (*7)
use Tabscanner\Api; $api = new Api('ApiKeyHere'); /** * Upload receipt to AI server to be processed * * @param $file array|string|object * array - single HTTP File Upload variable ($_FILES) (for array of files see upload_multiple method) * string - file path (used for fopen function) * object - a Laravel request file object (https://laravel.com/docs/5.6/requests#files) * * @return array */ $file = 'receipt.jpg'; //direct grab from directory $file2 = $_FILES['receipt']; //from upload form $upload_response = $api->upload($file); //or $file2 //receipt token is generated from API after successful upload, else will receive error $receipt_token = $upload_response['token']; /** * Get result * * @param $token string * @return array - receipt data * - will receive status as pending or done * - one way to use this method is to create a loop until you get a "status done" response */ $result_response = $api->result($receipt_token);
upload_multiple() //accepts multi-dimensional $_FILES
MIT