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. session_start();
if( $_POST[pwd] ) $_SESSION[admin] = md5( $_POST[pwd] );
if( $_SESSION[admin] != md5('mypassword') ) die("