/    Sign up×
Community /Pin to ProfileBookmark

Secure area without the use of sessions

Is it possible to do a secure area without any use of session stuff?
What i fear about sessions is that it makes use of cookies which is not ideal if i am going to access it on a public system.

edit : it does not have to use a BD as it is going to be a single user thing.

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@bokehSep 10.2006 — To recognise a user you need them to send a token with every request. That token can be a cookie, query string or form data.
Copy linkTweet thisAlerts:
@Leo_01authorSep 10.2006 — I decided to use sessions so how do i make the session expire after some time?

i know that i can set sessions to expire in the php.ini file which i won't have access to.

is there a way to overcome it in the script itself?
Copy linkTweet thisAlerts:
@bokehSep 10.2006 — is there a way to overcome it in the script itself?[/QUOTE][code=php]ini_set()[/code]
Copy linkTweet thisAlerts:
@NogDogSep 10.2006 — [url=http://www.php.net/manual/en/function.session-set-cookie-params.php]session_set_cookie_params[/url] can be used to control the lifetime of the session cookies. It would need to appear on each controlled page before the session_start() command. (This would be another good reason to put all the session/login stuff into a single file which can be require()'d at the start of each page's file.)
×

Success!

Help @Leo_01 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.26,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...