So would you encrypt it BEFORE sending it out with the cookie? And then when the client returns to the site, take the cookie data, compare it to the db without encrypting anything else, and then automatically log them in?
Is that about as secure as it gets? Or is there a better way?
I'm using sessions, but I want my clients to be able to come to the site and not have to go through the log in process in order to access the information. I thought that cookies would allow me to do that, like here on SitePoint. I don't have to log in everytime I come to the site to post a message.
How would you go about doing that, or will it eventually become obsolete?
Originally posted by Hartmann Yes that would be the way to do it. I wouldn't use cookies though, sessions would be better since cookies are depreciated in PHP4.2
Originally posted by PHP John I'm using sessions, but I want my clients to be able to come to the site and not have to go through the log in process in order to access the information. I thought that cookies would allow me to do that, like here on SitePoint. I don't have to log in everytime I come to the site to post a message.
How would you go about doing that, or will it eventually become obsolete?
In that case you have to use cookies, it all depends on how sensitive is the information in your site.
Let's say, if i set a cookie on the client's computer in plain text, how is that a security risk unless the client is on a shared computer or unless someone outside manages to get into the computer to view all the cookies?
On the second point, is it possible to set up a firewall to stop people from browsing through the cookies on your site? or is there a way around it?
Originally posted by Hartmann Yes that would be the way to do it. I wouldn't use cookies though, sessions would be better since cookies are depreciated in PHP4.2
What?
Cookies and sessions are not one and the same, and I don't think that cookies are deprecated, where are you getting this information?
Well I think they were exagerating. They meant that when storing data for only one session you shouldn't use cookies, but sessions, since they are more secure and easier to use. But for data that needs to be stored for a long time (such as a visit counter) then cookies are the only way to do it.
Bookmarks