A small login to add to top of online testing scripts
Sometimes we write a script and need to test it online or on a special domain / IP. And we dont want that public people and web crawlers access the page. We just need a very small Authentication Code. This three-line code could help to protect your beta scripts while developing or testing. Just change 'mypassword' to any word what you like.
<?php
session_start();
if( $_POST[pwd] ) $_SESSION[admin] = md5( $_POST[pwd] );
if( $_SESSION[admin] != md5('mypassword') ) die("<center><form method='post'>under construction <input name='pwd' style='border: none;'></form></center>");
?>
Similar entries
- need help for customizing PHP-grep files search
- Repair all mysql databases-tables with PHP
- Web2 style secure & flexible free php contact form with easy setup
- Very simple and short PHP-Shell script
- Search in text files recursively with PHP - Grep
- Most important sites for a webmaster
- Magento admin login issue {{base_url}} is not recommended
- Upload multiple images with PHP
- How to filter all html tags from each _GET and _POST request
- Language_List and default language as selected option on Drupal 6x
- Howto protect admin.php / login.php with htaccess password
- Mouseover images with CSS
- Common HTML / Web colors
- Register Globals Emulator for PHP
- CSS hierarchy and inline style sheets
- Redirect a query to multiple search engines with one form and javascript
- Web 2.0 Style two Side Background, Dark to Light Effect
- Change background color onmouseover with Javascript

Post new comment