PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a question: when you set a cookie using setcookie(), that cookie lives as long as you specified, right ? Right. Let's say that i have a cookie that lives 3 hours. How can i find out how much time has remained until that cookie expires ? Where is stored the cookie time ? Can i use it in a variable, let's say $timout = cookie_time; ?
when sent back, the cookie data only contains the value you set it to. So, you could store the time you set for it to die, inside that value, or store it on the server somewhere.