1. Go to this page and download the library: Download psecio/uri 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/ */
psecio / uri example snippets
\Psecio\Uri\Builder;
// Secret is loaded from a configuration outside of the library
$secret = $_ENV['link_secret'];
$uri = new \Psecio\Uri\Builder($secret);
$data = [
'foo' => 'this is a test'
];
$url = $uri->create('http://test.com', $data);
// http://test.com?foo=this+is+a+test&signature=90b7ac10b261213f71faaf8ce4008fdbdd037bab7192041de8d54d93a158467f
// Sign the URL: http://foo.com/user?test=1
$url = $uri->create('http://foo.com/user?test=1');