SET UP USER AUTHENTICATION with COOKIES - EASIEST METHOD\SOFTWARE??
This is important & I need an answer soon!
I have a linux hosted website. I need to be able to check existing users for a cookie or deny access completely. Also I need each placed cookie to expire 12 hrs after creation. How do I do this the easiest way? Please be gentle - I am very NEW at this.... |
Was the site developed with a server side scripting language such as PHP? Best way to handle the cookies would be to manipulate cookies with the relevant language. For example, with PHP you can use the setcookie() function.
setcookie($name,$value,<expire time (epoch)>); |
Quote:
But here is simple example for PHP: <?php if(!isset($_COOKIE['mycookie'])) { echo "<center><font color='666666'>No auth because no valid cookie found!</font></center>"; exit(0); } ?> Script expect user to have cookie set named: mycookie Not set, no access :) |
All times are GMT -5. The time now is 06:19 PM. |