Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Stay Logged in

by baku (Scribe)
on Feb 13, 2001 at 19:48 UTC ( #58131=note: print w/ replies, xml ) Need Help??


in reply to Stay Logged in

Not mentioned here, so I thought I'd throw it in...

You can set Apache to call your script 'as a directory:' e.g. http://mydom.xx/myscript can be a 'prefix,' and you then read some parametres from the $ENV{'REQUEST_URI'} string. (Take out the $ENV{'SCRIPT_URI'} to get the extras and you can relocate your script later!) This lets you create sessions without cookies, and still accept both GET and POST requests (or PUT, or whatever) by putting it into the URI: e.g. http://mydom.xx/jsmith/messages or sommat.

Plus, it makes a big CGI-based site look much more 'readable:' URLs like http://mydom.xx/script.pl?user=jsmith&request=blah get very hard to remember :-)

But you still need to make certain they've logged in correctly, so e.g. jsmith doesn't send his bookmarks file to someone else... which probably means keeping some kind of state file (as simple as a tied DB file) -- but then, you shouldn't trust cookies either, they can be faked too :-)


Comment on Re: Stay Logged in
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://58131]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-12-22 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (112 votes), past polls