PHP code example of docparser / docparser-php

1. Go to this page and download the library: Download docparser/docparser-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/ */

    

docparser / docparser-php example snippets




use Docparser\Docparser;
$docparser = new Docparser("APITOKEN");

echo $docparser->ping();

$docparser->getParsers();

$docparser->uploadDocumentByPath($parserId, $filePath, $remoteId = null);

$docparser->uploadDocumentByContents($parserId, $file, $remoteId = null, $filename = null);

$docparser->fetchDocumentFromURL($parserId, $url, $remoteId = null);

$docparser->getResultsByDocument($parserId, $documentId, $format = 'object');

$docparser->getResultsByParser($parserId, $options = []);
json
{
    "ocparser/docparser-php": "1.*"
    }
}