Realm Based Authentication Problem with webhost ( Yahoo domain )

From: Date: Thu, 10 Jun 2004 02:50:01 +0000
Subject: Realm Based Authentication Problem with webhost ( Yahoo domain )
Groups: php.general 
Request: Send a blank email to php-general+get-188008@lists.php.net to get a copy of this message
Hi all, I'm trying to implement "HTTP User Authentication" for some files but not directories. Below is the following script I am using to test "HTTP User Authentication": if ($PHP_AUTH_USER != "user" || $PHP_AUTH_PW != "pass") { // visitor has not yet given details, or their // name and password combination are not correct header('WWW-Authenticate: Basic realm="Realm-Name"'); header("HTTP/1.0 401 Unauthorized"); echo "<h1>Go Away!</h1>"; echo "You are not authorized to view this resource."; } else { // visitor has provided correct details echo "<h1>Here it is!</h1>"; echo "<p>I bet you are glad you you can see this secret page."; } The works on localhost but it doesn't work when uploaded to my Yahoo domain. Please keep in mind that I am talking about Yahoo's Small Business Webhosting and not Geocities Webhosting. Yahoo does provide Authentication but only for directories and not individual files. just wondering if there's another way. Thanks in advance. -gohaku

« previous php.general (#188008) next »