Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: (newrisedesigns) .htaccess and Cookies

by newrisedesigns (Curate)
on Jun 26, 2002 at 04:15 UTC ( #177297=note: print w/replies, xml ) Need Help??

in reply to htaccess and cookies

Well, i'm not so sure how to send back headers that would allow you to sign in a user through Apache UserAuthentication (your first one), but I don't think you want to do that anyway, unless you don't mind having large .htpasswd files :)

What your asking for is quite large, so I'll try my best to explain some of this, but you'll need to find some other tutorials (i have some links).

Considering your second point, this is a perfect task for (drumroll)!

First of all, Cookies are tidbits of information that your server sends to the user's browser, where it is stored. The stored info is then sent back when a new request is made to your site. I'm sure there's a better explanation out there, but I'm trying to keep it simple.

Those cookies will hold your users' username and password. Everytime they make a request to your page/program, it will receive the cookies, and then act on what it finds. The program will check the cookie information with the names/passwords you have stored on the server and compare. If they pass your specifications (usually matching, case-sensitive), you allow the user into your content.

Here's where comes in. is a wonderful module. It does nearly everything, except bring you pizza and beer. You can easily set cookies, and retrieve cookies with a few (one or two) lines.

Now, you're going to have to face some security issues (fake/spoof cookies), and some functionality issues (browsers without cookie support), so I suggest after getting your code together, submitting it here or having someone experienced in CGI to look at it.

Best of luck to you, and if you need any help, just ask!

John J Reiser

  • Comment on Re: (newrisedesigns) .htaccess and Cookies

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://177297]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2017-11-23 11:44 GMT
Find Nodes?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:

    Results (334 votes). Check out past polls.