Last active
August 29, 2015 14:06
-
-
Save manuks/97e544fd67a790c50080 to your computer and use it in GitHub Desktop.
To hide project until is released
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
.htaccess | |
RewriteEngine on | |
RewriteCond %{HTTP_COOKIE} !.*cover=1.* | |
RewriteCond %{REQUEST_URI} !^/cover.php | |
RewriteRule .* cover.php [R=302,L] | |
*/ | |
header("X-Robots-Tag: noindex,nofollow"); | |
if ($_COOKIE['cover'] == 1) { | |
header("Location: /"); | |
exit; | |
} | |
session_start(); | |
if ($_POST[$_SESSION['name']] === 'yetAn0ther!23'){ | |
setcookie("cover", 1); | |
header("Location: /"); | |
exit; | |
} | |
if (!$_SESSION['name']) { | |
$_SESSION['name'] = 'coverkey'.rand(5555, 8888); | |
} | |
?> | |
<form method="post" > | |
<input type=password name=<?php echo $_SESSION['name']; ?> > | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment