Ensure that the user has access to a page with a query string.
The code below ensures that the user has a specific query string, this can be useful especially if you want to prevent robots crawling your site and potentially triggering a task page (e.g. an import).
The example below works on the assumption that the URL is similar to:
<?php $keya = "369D1131-05F040E089B259E9A9CA7B64"; $keyb = $_GET["k"]; if ($keya == $keyb) // your code which you want to run else // non valid users – redirect to the homepage header("Location: http://your-website/"); die(); ?>
Convert .NET ticks to php ticks
<?php $tempTicks = $netTicks - 621355968000000000; $phpTicks = $tempTicks / 10000000; ?>
We'd love to welcome you into our office! We're only 20 miles north of Peterborough, conveniently just off the A16.
Apex Court, Elsoms Way