Best way to secure my ACP Sessions?

Hey everyone,

back with another problem. But, this one isnt an error, im just wondering how I can create a session for my ACP when I login, but then I want to make it so if I close the tab, exit the ACP, anything with leaving, it will destroy that session, and only that session. Any ideas?

Session destroying is built into the browsers. What you’d want to do is check for the presence of that session before the login script runs. If its there, destory it and send the person to the login screen. That’ll defeat someone who’s trying to hijack it. But it could become quite annoying, so you might actually set a timed session or cookie, then check that time against the current time.

Im very aware of destroying sessions, but I am unaware of how to do it without effecting the sessions outside my admin directory and I dont know how I would do it without directing them to a page that destroys it. I can only think of a way for each user to manually go to it when they want to destroy it.

I guess im saying im looking for a tutorial to destroy it when they leave the Admin Control Panel somehow without it destroying other sessions. Any help with this?

have a look at the session functions in php.net, session_id sounds like it might work for what you’re trying to do. but there is no way to prevent browsers from destroying on certain sessions. that’s why forums and other web software uses cookies or on-demand sessions.

Well, I might have to learn about how to use those then, cause thats actually what I am working on. But thanks for some help, ill look into it that stuff and if I cant get it, I will do my best with sessions.

Thanks anyways,
-Improvizionz

Sponsor our Newsletter | Privacy Policy | Terms of Service