PHP code example of aap_software / video_color_search_client

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

    

aap_software / video_color_search_client example snippets


use AapSoftware\VideoColor\SearchClient;

...

$img = imagecreatefromjpeg($fname);
$search = new AapSoftware\VideoColor\SearchClient();
$obj = $search->get($img);
imagedestroy($img);

if ($obj === null) {
    echo "Server not connected!\n";
    return;
} elseif (!$obj->result) {
	echo "Not found\n";
} else {
	echo "Title:\t" . $obj->title . "\n";
	echo "Frame:\t" . $obj->frame."\n";
	echo "Position:\t" . $obj->position . "\n";
	echo "Duration:\t" . $obj->duration . "\n";
	echo "Producer:\t".$obj->producer."\n";
	echo "Country:\t".$obj->country."\n";
	echo "Creation year:\t".$obj->creation_year."\n";
	echo "Genre:\t".$obj->genre."\n";
	echo "Actors:\t".$obj->actors."\n";
	echo "IMDB:\t".$obj->imdb."\n";
	echo "Kinopoisk:\t".$obj->kinopoisk."\n";
	echo "Description:\t".$obj->description."\n";
}

$obj = $search->get($img);

$obj = $search->get($img,"en");

$obj = $search->get($img,"ru");