Topic: PHP questiony thingy Pages that link to <a href="https://ozoneasylum.com/backlink?for=27727" title="Pages that link to Topic: PHP questiony thingy" rel="nofollow" >Topic: PHP questiony thingy\

 
Author Thread
Sloloem
Bipolar (III) Mad Scientist

From: Camillus, NY, USA
Insane since: Jul 2000

IP logged posted posted 04-03-2006 20:17 Edit Quote

So a thought occurred in mine head, is it possible in PHP to give a certain file a time limit.
It was an idea for my, probably rather childish authentication system...

A file would be created with a random string and that string is passed from form to form on the site while looking around the admin features,
but there would be an inactivity time limit, that is reset every time you load a page with the key. Eg if you don't load anything for 5 minutes the file is removed so you would be required to log back in.

Or something.

Nathus
Bipolar (III) Inmate

From: Minnesota
Insane since: Aug 2003

IP logged posted posted 04-03-2006 21:28 Edit Quote

A cookie with a life of 5 minutes? Reset its creation time everytime you load the page.

http://www.php.net/set_cookie

(Edited by Nathus on 04-03-2006 21:30)

divinechaos
Nervous Wreck (II) Inmate

From:
Insane since: Dec 2001

IP logged posted posted 04-04-2006 04:58 Edit Quote

I would instead suggest using sessions and setting max_lifetime, cookie_expire, and the whole sh-bang:
http://ca.php.net/manual/en/ref.session.php

Edit: Um, there is no "cookie_expire". There's "cookie_lifetime" and "cache_expire", but they had no lovechildren. Alas, the saga continues.

HTH,
DC

(Edited by divinechaos on 04-04-2006 04:59)

Sloloem
Paranoid (IV) Mad Scientist

From: Rochester, NY, USA
Insane since: Jul 2000

IP logged posted posted 04-04-2006 07:28 Edit Quote

Assuming I can do that without using HTTP authentication (brain too tired at the moment to read) sessions actually sounds like a pretty good idea.

I think I saw that once a while ago when I was starting to code this site...but some reason passed on it.
I'll definitely investigate the both options when I have more time and energy and continue to post adventures here.

Thanks for the input.

waseem
Obsessive-Compulsive (I) Inmate

From:
Insane since: Jan 2015

IP logged posted posted 01-20-2015 06:24 Edit Quote

I did a quick search of the archives for the planetary locator map - found the original threads but not the actual map.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu