Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Goes to this page if there is not cookie:
- <?php
- $check = $_COOKIE['cUser'];
- if(!$check){
- header("Location: https://cits-silverneon123-1.c9.io/user/user.html");
- }
- ?>
- upon login (wont work)...
- <?php
- $user = $_POST['user'];
- $pass = $_POST['pass'];
- if(!file_exists('../cUser/' . $user . '/')){
- header("Location: https://cits-silverneon123-1.c9.io/user/join.html");
- }else{
- $hash = hash('ripemd160', $pass);
- $getPass = file_get_contents("../cUser/" . $user . "/pass.txt");
- if($hash == $getPass){
- setcookie("cUser", $user, time() + (86400 * 7));
- setcookie("cPass", $pass, time() + (86400 * 7));
- header("Location: https://cits-silverneon123-1.c9.io/");
- }else{
- header("Location: https://cits-silverneon123-1.c9.io/user/login.html");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement