Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- authenticate.php?username={$_GET['username']}&password={$_GET['password']}
- if ($_GET['username'] == "secret_username" && password == "secret_password")
- {
- $_SESSION['user'] = $username;
- header("Location: password_protected_page.php");
- exit;
- }
- <?php
- $filename = "/home/users.txt";
- $file = fopen( $filename, "r" );
- $display = fread( $file, filesize( $filename ) );
- fclose($file);
- ?>
- /root/users.Joe.php
- /root/users/Juan.php
- /root/users/Tim.php
- <?php
- $userpath='/var/www/html/users/Tim';
- $password='Timspassword';
- ?>
- <?php
- include '/root/users/'.$_POST[username];
- if ($password == $_POST['password'])
- {
- $_SESSION['loggedin']='yes';
- $_SESSION['expire']='<how much time you need?>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement