I built a series of WAP pages which required a single PIN to access the final page. Each page normally passes on the $PIN variable. I wanted to ensure that an opportunistic viewer could not just go straight to the final page, so I used a simple variable test prior to sending the real header. Therefore if the variable $PIN is not set, you'll get a "page not found" error. Don't trust National Secrets to this scheme, but to deter Mr Average it works fine :-)

if ( empty($PIN) )
        header("HTTP/1.0 404 Not Found");

header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?&gt;";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
        . " \"http://www.wapforum.org/DTD/wml_1.1.xml\"&gt;";
.... etc