1. Go to this page and download the library: Download intervention/imagehash 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/ */
intervention / imagehash example snippets
use Intervention\Image\Drivers\Gd\Driver as GdDriver;
use Intervention\ImageHash\ImageHasher;
use Intervention\ImageHash\Strategies\Difference;
$hasher = new ImageHasher(new GdDriver(), new Difference());
$hash = $hasher->hash('path/to/image.jpg');
use Intervention\Image\ImageManager;
use Intervention\Image\Drivers\Gd\Driver as GdDriver;
use Intervention\ImageHash\Strategies\Difference;
$image = ImageManager::usingDriver(GdDriver::class)
->decodePath('path/to/image.jpg')
->scale(width: 300);
$hash = $image->analyze(new Difference()); // all strategies are possible here