diff options
-rw-r--r-- | index.php | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -2,19 +2,20 @@ $pass = 'REPLACE THIS WITH A SHA256 HASH OR SET VARIABLE TO NULL'; $indexignore = array(); $headerfile = "upload.html"; +$url = "http://www.blaupload.co.uk/"; if ($_POST && $pass) { if ((hash("sha256", $_POST['password']) == $pass)) { if (isset($_POST['rememberme'])) { /* Set cookie to last 1 year */ - setcookie('password', hash("sha256", $_POST['password']), time()+60*60*24*365, '/', 'www.blaupload.co.uk'); + setcookie('password', hash("sha256", $_POST['password']), time()+60*60*24*365, '/', $_SERVER['SERVER_NAME'] ); } else { /* Cookie expires when browser closes */ - setcookie('password', hash("sha256", $_POST['password']), false, '/', 'www.blaupload.co.uk'); + setcookie('password', hash("sha256", $_POST['password']), false, '/', $_SERVER['SERVER_NAME'] ); } - header('Location: http://www.blaupload.co.uk/'); + header('Location: ' . $url); } else { - header('Location: http://www.blaupload.co.uk/'); + header('Location: ' . $url); exit(); } } else if ($pass) { |