Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 29th, 2003, 01:53 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Javascript and PHP?

Hello,

I have a question. It is possible, that a session in php will be destroyed, although the user didn´t log himself out?!

I think that probably a javascript can do this... can anyone help me?

Bye cell

Reply With Quote
  #2  
Old April 29th, 2003, 08:25 PM
hh hh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Aalborg, Denmark
Posts: 36 hh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to hh
RE: Javascript and PHP?

If the session times out or if the user closes the browser then the session is destroyed. I don't think javascript can be used for such a thing because it's client side and php is server side.

Reply With Quote
  #3  
Old April 30th, 2003, 01:05 AM
honcho's Avatar
honcho honcho is offline
Contributing User
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Cape Cod
Posts: 1,347 honcho User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 52 m 2 sec
Reputation Power: 3
RE: Javascript and PHP?

The session might look like it's destroyed if the client (via javascript or something else) deletes the cookie that stores the session id.

Reply With Quote
  #4  
Old April 30th, 2003, 01:05 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Javascript and PHP?

Hello,

and how can I achieve this?

Reply With Quote
  #5  
Old April 30th, 2003, 03:09 PM
marcel marcel is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Nieuw Vennep ,Netherlands
Posts: 108 marcel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Javascript and PHP?

session_destroy() ?

Reply With Quote
  #6  
Old May 2nd, 2003, 10:06 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Javascript and PHP?

I destroy my session with session_destroy()
but how can I achieve, that if someone forgot to logout and he closes the window, that the session will be destroyed also

Reply With Quote
  #7  
Old May 2nd, 2003, 03:26 PM
hh hh is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Aalborg, Denmark
Posts: 36 hh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to hh
RE: RE: Javascript and PHP?


Quote:
I destroy my session with session_destroy()
but how can I achieve, that if someone forgot to logout and he closes the window, that the session will be destroyed also


In short you can't make action on browser close... what you can is make a hidden iframe thats updating the users last seen time every 5 minutes or like, then you have an approx. value of when the user left the site.. ig you get my point?

Reply With Quote
  #8  
Old May 2nd, 2003, 07:05 PM
crisp crisp is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Holland
Posts: 336 crisp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Javascript and PHP?

You could spawn a popup using the onunload event that targets a script that logs the user out, and then closes itself, however if the user has a popup-blocker this won't work offcourse.

Reply With Quote
  #9  
Old May 5th, 2003, 08:44 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Javascript and PHP?

Hello,

i don´t know what you are meaning with a hidden iframe...

can you explain it to me, e.g. with a code snipplet??

Bye cell

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Javascript and PHP?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway