<?php
use Symfony\Component\HttpKernel\UriSigner;
// create UriSigner with a secret
$signer = new UriSigner('fhojd2ctzzgc8');
$uri = 'https://www.google.com/search?q=php';
$signedUri = $signer->sign($uri);
echo $signedUri . PHP_EOL . PHP_EOL;
if ($signer->check($signedUri)) {
echo 'check was ok. Now something can be done with URI';
}