Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /************************************************************************/
- /* PHP Simple PasswordProtect v1.0 */
- /* =========================== */
- /* */
- /* Written by Steve Dawson - http://www.stevedawson.com */
- /* Freelance Web Developer - PHP, MySQL, HTML programming */
- /* */
- /* This program is free software. You can redistribute it and/or modify */
- /* but please leave this header intact, thanks */
- /************************************************************************/
- ##########################################################################
- $password = "passwordhere"; // Modify Password to suit for access, Max 10 Char.
- ##########################################################################
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>- Password Protected -</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <style type="text/css">
- <!--
- P { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
- TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
- -->
- </style>
- </head>
- <body>
- <?php
- print "<h2 align=\"center\">- Password Protected -</h2>";
- // If password is valid let the user get access
- if (isset($_POST["password"]) && ($_POST["password"]=="$password")) {
- ?>
- <!-- START OF HIDDEN HTML - PLACE YOUR CONTENT HERE -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <style type="text/css">
- <!--
- P { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
- TD { FONT-SIZE: 8pt; COLOR: #000000; FONT-FAMILY: Verdana, Tahoma, Arial}
- -->
- </style>
- </head>
- <body>
- <!-- START OF HIDDEN HTML - PLACE YOUR CONTENT HERE -->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Takedown</title>
- <link href="css/style.css"rel="stylesheet" type="text/css" />
- </head>
- <body>
- </div>
- <h2 class="head" ><center>contraversy</center></h2>
- <div class="content">
- <p></p>
- </div>
- <div class="footer">
- </div>
- </body>
- </html>
- <!-- END OF HIDDEN HTML -->
- <?php
- }
- else
- {
- // Wrong password or no password entered display this message
- if (isset($_POST['password']) || $password == "") {
- print "<p align=\"center\"><font color=\"red\"><b>Incorrect Password</b><br>Please enter the correct password</font></p>";}
- print "<form method=\"post\"><p align=\"center\">Please enter your password for access<br>";
- print "<input name=\"password\" type=\"password\" size=\"25\" maxlength=\"10\"><input value=\"Login\" type=\"submit\"></p></form>";
- }
- ?>
- <BR>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment