Hardcoding the username and password into a script
<? if ( (! isset ($PHP_AUTH_USER)) || (! isset ($PHP_AUTH_PW)) || ($PHP_AUTH_USER != 'secret') || ($PHP_AUTH_PW != '') ) : header('WWW-Authenticate: Basic realm="Secret Family"'); header('HTTP/1.0 401 Unauthorized'); print "Authorization is required."; exit; endif; ?>