I am trying to create a website that is only accessable by a password. I want a popup box to display before the page even loads, I think you know what I'm talking about. Does anybody know how to do this?
No announcement yet.
HTTP Authentication
Collapse
X
-
A simple password can be executed by javascript.
Should work fine on a site hosted by an ISP.
For a more complex password function, you will require server access. So you would have to host it yourself, or pay for the site.The reason a diamond shines so brightly is because it has many facets which reflect light.
Comment
-
Originally posted by Mr.TweakHeh, javascript passwording. Been there, done that. Too easy to find passwords.
Honesty on the internet? Now there's a concept!The reason a diamond shines so brightly is because it has many facets which reflect light.
Comment
-
is your site big enough to warrant its own server?
why dont you just add some simple php tags to the start of all the pages?
for example
< ? if(isset($password)){
if($password == 'yourpassword'){
? >
this is where the html goes gor your site...
< ? die;}? >
this is where the html goes for unauthorised viewers...
to acess the site you would just type
http://server/page?password=yourpassword
this is dependant on your hosts webserver abilities.
Some offer ASP support rather than PHP and some offfer none...
Comment
-
i don't think they even offer perl scripting support, so i doubt they will support php
Comment
-
php can actually do proper HTTP Basic Authentication by sending the page format header etc and popping up the proper browser specified logon box which you can check in a script. the beauty of it is that the only way yuou can get the password is by getting ftp or shell access to the server as it is not shown in any way on the end users page.SileNceR, Messenger of the Dark and the Night. To post quality, or not to post at all, THAT is the Question - Never again ask what can my post count do for me besides increasing my ego, but instead ask what can I do to help someone else!
Overclockers Melbourne (http://www.ocmelbourne.com).
Comment
-
I use IIS 5.0 which allows me to password a site as you require (as any webserver worth it's crust should), and host my own site at home using Dynamic DNS for name service. I have an 256KBPS/64KBPS ADSL conneciton so it isn't too bad, over a modem would be fairly crap! If you like I can host a site for you. I'm moving soon so I'll be off the air until at least the end of Feb, but when I come back I should have a have a very tasty 1.5MBPS/256KBPS ADSL link!!
Comment
Comment