PHP code example of veryfi / veryfi-php

1. Go to this page and download the library: Download veryfi/veryfi-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

veryfi / veryfi-php example snippets


// First, include the autoload file generated by Composer

$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);
bash
composer