Permalink
Browse files

More tweeks with a display of the url for redirect

  • Loading branch information...
1 parent f0013ea commit 699e08ae320b2099d229405c463a2b0f97d2c300 @jdsharp committed Oct 14, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 go.php
View
5 go.php
@@ -4,7 +4,7 @@
function lookup($key) {
foreach (file('urls.txt') as $line_num => $line) {
$line = trim($line);
- $eq = strpos('=', $line);
+ $eq = strpos($line, '=');
$k = substr($line, 0, $eq);
$v = substr($line, $eq+1);
@@ -18,4 +18,5 @@ function lookup($key) {
if (!isset($match[1])) {
die("Missing parameter, call via /go/[key]");
}
-header('Location: ' . lookup($match[1]));
+$url = lookup($match[1]);
+echo 'Redirecting to: <a href="' . $url . '">' . $url . '</a><meta http-equiv="Refresh" content="5; URL=' . $url . '">';

0 comments on commit 699e08a

Please sign in to comment.