Forum Moderators: coopster

Message Too Old, No Replies

Ending Session by leaving domain - is it possible?

         

scott859

6:35 am on May 13, 2006 (gmt 0)

10+ Year Member



Greetings,

Is there any PHP code that will require a logged in user to re-login after they have left the domain which the login session was started? In other words they log into mysite.com and leave without logging out to go to anothersite.com. Then they return to mysite.com - is there code that will require them to log in again because they left the initial domain?

Thanks in advance for any help you can give.

Scott

eelixduppy

11:51 am on May 13, 2006 (gmt 0)



If you want to do this without a logout page, the only way i see it is if you set the maxlife of the session variables. However, this method won't just log them out for leaving your site, but also for periods of inactivity.This thread [webmasterworld.com] may provide you with some answers.

eelix

scott859

12:43 pm on May 13, 2006 (gmt 0)

10+ Year Member



Thanks eelix,

Acutally, I should have explained in my earlier post, there is a logout link on the site which will end the session.

My client is asking if the session also can be ended by the user leaving the domain (the domain which the session started).

Scott

jatar_k

2:42 pm on May 15, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



other than the actual logout link/button they would have to close their browser or the session would have to expire for it to end