<?php
session_start();
require_once 'class.otu.php';
$onUrl = OTU::getOnUrl(); // Splits by ? on REQUEST_URI and returns the first part.
$realUrl = OTU::getRealUrl($onUrl); // Returns the real url, if valid.
$url = '/url/that/needs/to/be/hidden'; // The url that needs to be hidden
$obs = OTU::getObfuscatedUrl($url); // The obfuscated url
echo "Currently on: {$realUrl} <br />";
echo "<a href=\"{$obs}\">Link</a><br /><br />";
if (!is_null($realUrl)) {
echo "Reloads in 3 seconds";
echo '<script>window.setTimeout(function() {location.reload();}, 3000);</script>';
}
|