Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Auto Web Application Download/Install Script!
- Version 2.1
- Copyright 2014 All Rights Reserved Enkel Hosting Ltd
- More PHP Scrips at http://devbox.enkelhosting.com
- */
- // Options
- $security = 'none'; //Security method
- /*
- Security Modes:
- ip: Use a whitelist IP and only allow access to someone on that IP
- password: User will be asked to enter the password chosen
- none: No security will be used
- */
- // IP Whitelist Options
- $ip = '000.000.000.000'; //Remote IP
- // Password Options
- $password = 'Password123';
- $debug = false;
- if( $security == 'ip' ){
- if( $ip != $_SERVER['REMOTE_ADDR'] ){
- echo 'Your IP is not whitelisted!';
- exit;
- }
- } else if( $security == 'password' && !isset($_GET['password'] ) ){
- echo 'Please type the password!';
- echo '<form>';
- echo '<input type="password" name="password">';
- echo '<input type="submit" value="Login">';
- echo '</form>';
- exit;
- } else if( $security == 'password' && isset($_GET['password'] ) ){
- if( $password != $_GET['password'] ){
- echo 'Incorrect Password';
- exit;
- }
- } else if( $security == 'none' ){
- } else {
- echo 'Invalid Security Mode';
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment