[thelist] PHP Sessions question

Jake Aust jake at lovejoycreative.com
Sat Dec 14 13:50:01 CST 2002


Is there any way to tell if a particular session_id has expired...given that
the program that is checking it is not running in the browser of the user
that created the session?

My problem is this I have a mulit-step form app, where one of the steps
allows you to upload a file. At the end of the form app, all the data gets
sent to an email address, with the file attached. I am currently creating a
directory in my upload directory that is named witht the session_id. That
way I can check it later for sending the email. However, if a user abandons
the form before the end step then the file will just sit there. I want to
write a PHP that runs every night as a cron that checks for abandoned files
and deleted them. The cleanest thing I can think of is to try to check the
session_id (which is the folder name) and see if it has expired. If it
has...delete the directory.

Otherwise, is there a way to get the creation date of a file through PHP. I
could do it that way...just check to see if the file is older than my
session expiration setting.

Any help would be appreciated.



More information about the thelist mailing list