Quote:
Originally Posted by dmadance
Does anyone have a good script that can create a login to a site protected by htaccess. Also does someone have a script to logout from a site protected by htaccess.
I was thinking the logout could be done with AJAX by asking for a url http://randomstring:randomstring@mysite.com and when that fails to somehow redirect to the homepage. Is this feasable? If somebody has already done this I would love the code.
I know one can do logins with "http://username  assword@mysite.com", does anyone have a script of some sort that can take userame and password as inputs to a form, and only goes to the page if authenticated to go the protected site. I think this can be done with AJAX. I am very new to AJAX (just read AJAX in 10 minutes 10 minutes ago) so if someone out there knows this, I would appreciate the helps.
|
(If you use cPanel), just it's "Web protect" or "Protect folders" area (the name depends on your skins used). Once you add a page or folder to this area, you have to enter a user and pass to get access to the page, and you can check the box to remember the login if wanted. No "logout" is required since you're logged out when you leave the page.