PHP code example of filipsedivy / kontrola-tachometru

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

    

filipsedivy / kontrola-tachometru example snippets




$guzzle = new \GuzzleHttp\Client();
$goutte = new \Goutte\Client();

// OCR service

// 2Captcha.com
$ocr = new \MDCR\TachometerCheck\Adapter\OCR\TwoCaptcha('API KEY', $guzzle);

// ---- OR

// Google Vision
putenv('GOOGLE_APPLICATION_CREDENTIALS=' . __DIR__ . '/google_credentials.json');
$imageAnnotatorClient = new \Google\Cloud\Vision\V1\ImageAnnotatorClient();
$ocr = new \MDCR\TachometerCheck\Adapter\OCR\GoogleVision($imageAnnotatorClient);

// Add OCR to crawler

$crawler = new \MDCR\TachometerCheck\Adapter\Crawler\Crawler($ocr, $goutte);

// Load tachometer check
$tachometerCheck = new \MDCR\TachometerCheck\TachometerCheck($crawler);
$histories = $check->getHistory('VIN CODE');