veryfi / veryfi-php
veryfi php SDK
1.0.3
2024-01-02 20:06 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
Requires (Dev)
- phpunit/phpunit: 9.5.18
README
https://veryfi.github.io/veryfi-php/
Veryfi 是一个用于与 Veryfi OCR API 通信的 php 模块
安装
在项目根目录运行
composer require veryfi/veryfi-php
入门
获取客户端 ID 和用户密钥
如果您没有 Veryfi 账户,请在此处注册: https://hub.veryfi.com/signup/api/
php API 客户端库
可以使用 Veryfi 库与 Veryfi API 通信。所有可用功能在此处描述 DOC
以下是一个使用 Veryfi 从文档中 OCR 和提取数据的示例脚本
如何使用它?
// First, include the autoload file generated by Composer require_once "path_to_your_vendor_autoload"; // Then use the Veryfi API use veryfi\Client;
处理文档
$client_id = 'your_client_id'; $client_secret = 'your_client_secret'; $username = 'your_username'; $api_key = 'your_api_key'; $veryfi_client = new Client($client_id, $client_secret, $username, $api_key); $categories = array('Advertising & Marketing', 'Automotive'); $file = 'path_to_your_image'; $return_associative = true; $delete_after_processing = false; $json_response = json_decode($veryfi_client->process_document($file, $categories, $delete_after_processing), $return_associative);
更新文档
$client_id = 'your_client_id'; $client_secret = 'your_client_secret'; $username = 'your_username'; $api_key = 'your_api_key'; $veryfi_client = new Client($client_id, $client_secret, $username, $api_key); $document_id = 'your_document_id' //as int $parameters = array('category' => 'Meals & Entertainment', 'total' => 11.23); $return_associative = true; $json_response = json_decode($veryfi_client->update_document($document_id, $parameters), $return_associative);
需要帮助?
访问 https://docs.veryfi.com/ 以访问 Veryfi API 文档门户中的集成指南和使用说明
如果您遇到任何问题或需要安装或使用库的帮助,请联系 support@veryfi.com。
如果您在此库中发现错误或希望添加新功能,请为此仓库打开问题或拉取请求!
要了解更多关于 Veryfi 的信息,请访问 https://www.veryfi.com/
教程
以下是 php SDK 的介绍。