Jump to content
xisto Community
iGuest

Can Some One Tell Me Whats Wrong With This

Recommended Posts

i need help finding out whats wrong with this code it just sends me to the error page when ever i enter the right login.

<?php$user = 'william';$pass = 'password';function httpauth(){   header('WWW-Authenticate: Basic realm="Dark Zone Staff Login"');   header('HTTP/1.0 401 Unauthorized');   echo '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><HTML><HEAD><TITLE>401 Authorization Required</TITLE></HEAD><BODY><H1>Authorization Required</H1>This server could not verify that youare authorized to access the documentrequested.  Either you supplied the wrongcredentials (e.g., bad password), or yourbrowser doesn't understand how to supplythe credentials required.<P><P>Additionally, a 404 Not Founderror was encountered while trying to use an ErrorDocument to handle the request.<HR><ADDRESS>Apache/1.3.37 Server at http://110mb.com/404.php Port 80</ADDRESS></BODY></HTML>';   exit;}while($_SERVER['PHP_AUTH_USER'] != $user && $_SERVER['PHP_AUTH_PW'] != $pass){httpauth();}?><html><head><title>mypage</title></head><body><h1>PHP RULES</h1></body></html>

Share this post


Link to post
Share on other sites

It apparently thinks you have a bad user name or password.And that script is using HTML2.0, a couple of generations old. Probably not completely understood by today's Browsers, but then again, I yearn for the simpler times...

Share this post


Link to post
Share on other sites

Ah yeah it is using HTML 2.0 and it says the password was bad. For some reason. Does your bowser support HTML 2.0? If not try finding a different Security code they are scattered all over the web

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.