PHP code example of ozanhazer / safe-link
1. Go to this page and download the library: Download ozanhazer/safe-link 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/ */
ozanhazer / safe-link example snippets
use Alfatron\SafeLink;
$safelink = new SafeLink('my-not-short-private-key');
$safelink->redirect('https://second-project/path', ['user' => '[email protected]', 'action' => 'feed the cat'])
use Alfatron\SafeLink;
$safelink = new SafeLink('my-not-short-private-key');
$data = $safeLink->verify();
assert($data['user'], '[email protected]');
use Alfatron\SafeLink;
$safeLink = new SafeLink($privateKey, ['timeout' => 2]);