From 2d9c7b7dd4cc6b2d2693005222a19fb8648e5796 Mon Sep 17 00:00:00 2001 From: trax Date: Sat, 15 Feb 2014 12:16:33 +0100 Subject: [PATCH] add form and html stuff --- index.php | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/index.php b/index.php index 0d2b09a..8c7b6ee 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,4 @@ ./?'.$urlhash.'
'; - echo 'As long as there is not collision you can shorten it up to 3 characters.'; - return 0; + $content = './?'.$urlhash.'
+ As long as there is not collision, you can shorten it down to 3 characters.'; } else if(!empty($_GET)) { $urlhash = key($_GET); @@ -33,21 +31,36 @@ if(!empty($_GET['url'])) { $findfiles = glob($hashfilepath . '*'); if(empty($findfiles)) { - echo 'No files.'; + $content .= 'No files.'; return 1; } else if (count($findfiles) > 1) { foreach($findfiles as $file) { $file = str_replace('/', '', substr($file, 5)); - echo './?'.$file.'
'; + $content .= './?'.$file.'
'; } - return 1; } $fullfilepath = current($findfiles); header('Location:' . file_get_contents($fullfilepath)); return 0; +} else { + $content = '
+ Enter your URL: +
'; } -echo './?url=<url>'; -return 0; +//actual page below +?> + + + + Shuri + + +
+ + +
+ +