I don't quite understand this. If a user is on my site and then decides to go into his favourites and go to yahoo.com - this won't work. I think you are assuming the user is going to click on something I have set up - I want this to be invisible - however this user decides to leave my site. It appears though from the answers I have received - that this is not possible....
B. ----- Original Message ----- From: "Kevin Stone" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Friday, March 21, 2003 4:21 PM Subject: Re: [PHP] Sessions question > This is one of those rare things in programming that can only be done one > way. Absolutely the only way to kill the session when a user leaves your > site is to go through a script and then redirect after the session has been > destroyed. For this to work every outgoing link on your website will have > to point to a script. Then you'll pass the redirect url or url id (that > referse to a url in your database) through the link and redirect after > session_destroy() has killed the session. > > The link can look like this: > <a href="exit.php?url=http://www.thiersite.com">www.theirsite.com</a> > > The script will look something like this: > <? // exit.php > session_start(); > session_destroy(); > header("Location: ".$_POST['url']); > ?> > > Keep in mind if you want to do this then the user will not be able to use > his/her back button in order to return to your website unless you define an > additional redirect in a conditional that states "if the session is not > active then go here". > > Voodoo. *LOL* > > - Kevin > > > ----- Original Message ----- > From: "Beauford.2002" <[EMAIL PROTECTED]> > To: "Ford, Mike [LSS]" <[EMAIL PROTECTED]>; "'Justin French'" > <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> > Sent: Friday, March 21, 2003 12:56 PM > Subject: Re: [PHP] Sessions question > > > > So is there anyway to do this - perl, javascript, voodo? > > > > > > ----- Original Message ----- > > From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> > > To: "'Justin French'" <[EMAIL PROTECTED]>; "Beauford.2002" > > <[EMAIL PROTECTED]>; "PHP General" <[EMAIL PROTECTED]> > > Sent: Friday, March 21, 2003 11:04 AM > > Subject: RE: [PHP] Sessions question > > > > > > > > -----Original Message----- > > > > From: Justin French [mailto:[EMAIL PROTECTED] > > > > Sent: 21 March 2003 15:59 > > > > > > > > on 22/03/03 2:27 AM, Beauford.2002 ([EMAIL PROTECTED]) wrote: > > > > > > > > > What about cookies - someone said if you put no time limit > > > > on a cookie it > > > > > dies when you leave the site - I'm not sure about this, but > > > > any help is > > > > > appreciated. > > > > > > > > I think it's defined as "when the browser is closed", not > > > > "when the browser > > > > is no longer in your domain" > > > > > > That is correct. > > > > > > Cheers! > > > > > > Mike > > > > > > --------------------------------------------------------------------- > > > Mike Ford, Electronic Information Services Adviser, > > > Learning Support Services, Learning & Information Services, > > > JG125, James Graham Building, Leeds Metropolitan University, > > > Beckett Park, LEEDS, LS6 3QS, United Kingdom > > > Email: [EMAIL PROTECTED] > > > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php