GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech .htpasswd logout? (https://gfy.com/showthread.php?t=1353177)

Publisher Bucks 03-15-2022 03:35 PM

.htpasswd logout?
 
Are there any other options to logout when using a user authentication based method through .htaccess other than this?

Quote:

logout:[email protected]
If there was an option to be able to achieve this with .php and you could point me in the right direction where I can read up on it, that would also be great :thumbsup

All the search results I have found only discuss the above option.

fuzebox 03-15-2022 05:09 PM

Not really possible as the browser hasn't "logged in" in the first place.

Publisher Bucks 03-15-2022 06:48 PM

Quote:

Originally Posted by fuzebox (Post 22979225)
Not really possible as the browser hasn't "logged in" in the first place.

Yeah, all im finding is basically swapping the existing user/pass combo for one that doesnt exist or theres a Javascript that sort of does it, but again its just a way to do what I posted originally by swapping the user/pass combination and redirecting to another page.

zerovic 03-16-2022 02:15 AM

Try to inspect what, if anything, gets stored in your browser when you log in. I can't recall, if a session is created or not... Anyway, using a fake user/pass to login again will do the trick, just as you posted above.

Cheers,
z

just a punk 03-16-2022 02:17 AM

Code:

if (isset($_COOKIE['my_user_cookie'])) {
    unset($_COOKIE['my_user_cookie']);
    setcookie('my_user_cookie', '', time() - 3600, '/');
    header('Location: https://gfy.com/');
}

Or maybe I just didn't get the question.


All times are GMT -7. The time now is 03:58 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123