diff options
| author | Horus3 | 2014-11-16 21:20:41 +0100 |
|---|---|---|
| committer | Horus3 | 2014-11-16 21:20:41 +0100 |
| commit | 4168f7aff52f6e7cf7320e42252227dac5169c4a (patch) | |
| tree | f73e5e93e8bc8d9b5ad8ef415b59ede323663f76 /linkshorter/goto.php | |
| download | tools.iamfabulous.de-4168f7aff52f6e7cf7320e42252227dac5169c4a.tar.gz | |
Initial commit.
Diffstat (limited to 'linkshorter/goto.php')
| -rw-r--r-- | linkshorter/goto.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/linkshorter/goto.php b/linkshorter/goto.php new file mode 100644 index 0000000..d77e1e2 --- /dev/null +++ b/linkshorter/goto.php @@ -0,0 +1,13 @@ +<?php +require 'functions.php'; +ob_start("sanitize_output"); +require 'db.php'; + +$url = $db->get($_GET["goto"]); +if( ! $url || $url == "" ){ + do_output("<p>This url wasn't found on this server.</p>", "404 Not Found", false, "<h1>404 - Not found</h1>"); +} + +header($_SERVER['SERVER_PROTOCOL'] . " 301 Moved Permanently"); +header("Location: ".$url); +exit; |
