TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Protected Page: PHP

Page: 1 Reply
Aug 21st 2001#13862 Report
Member since: Jun 6th 2001
Posts: 45
Is there anyway to make a page protected with a password through php alone?
Reply with Quote Reply
Aug 21st 2001#13983 Report
Member since: Mar 18th 2001
Posts: 1690
I think yes.

Im not heavily into php yet. There are only a few things that I know well. But you should be able to 'require' or 'include' a file in your HTML document, before you enter the <.html> tag that will call another php script that will perform Basic HTTP authentication. If you use BASIC HTTP, you will still need a .htaccess and .htpassword file.

You might be able to do it through 'sessions' though. If you are able to, this is the way I would go. And you could also experiment with cookies that will allow previously authenticated users to not have to log in. I think MobileBadBoy has played with sessions, so you may try emailing him, or join the #teamps irc channel on irc.othersideirc.com and ask him.
Reply with Quote Reply
Aug 22nd 2001#14003 Report
Member since: Jun 30th 2001
Posts: 447
Yes, it's possible using PHP. The best way is to use sessions like Axiom said. I would give you code, but I don't have the time to type it up and everything thing I've done in password protection is proprietory. I know http://www.hotscripts.com has some PHP modules that do this including phpSecurePages (my favorite).
Reply with Quote Reply
Aug 31st 2001#15004 Report
Member since: Aug 31st 2001
Posts: 1
Here a little help from me.

Header("WWW-authenticate: basic realm=\"PROTECTED\"");
Header("HTTP/1.0 401 Unauthorized");
?>

Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum