1. Go to this page and download the library: Download abovesky/url-auth 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/ */
abovesky / url-auth example snippets
$urlAuth = new Md5('randomkey');
$urlAuth->sign('https://myapp.com', 30, 'days');
// => The generated url will be valid for 30 days
use abovesky\UrlAuth\Md5;
$urlAuth = new Md5('mysecretkey');
$expirationDate = (new DateTime)->modify('10 days');
$urlAuth->sign('https://myapp.com', $expirationDate);
// => The generated url will be valid for 10 days
$urlAuth->sign('https://myapp.com', 30, 'days');
// => The generated url will be valid for 30 days