• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP and secure cookies

Drakkon

Diamond Member
Server I am using isn't allowing session variables so I'm stuck to using cookies. In the past just used session to store username/id's but now with cookies I would need to encrypt those to a level that makes them somewhat 'secure'.

Anyone have any info on this sort of thing of something that will work and go rather fast (i.e. not have to search a DB each time the user accesses a page to authenticate the cookie)?
 
nothing wrong with a query to pull user data using a couple unique hashes on every page

make two hashes using user data that will never change (id, insert date, etc) + a unique unknown string (like md5(userid.'sPHincterR1ngS')

store them in your user table and index both columns

the query on every page checking for those cookie values should be really fast
 
Back
Top