famerdave
11-24-2011, 04:59 AM
I found this code online and was wondering what it does and how it works.
$_SESSION['token'] = md5(session_id() . time());
Mainly wondering what the time thing. We're using this to prevent someone from reposting the same comment/review on a review thing when the click refresh. Wanted to make sure it was going to be messing up if the user came back by the site at the same time the next day, didn't really know about what it did. Would the number ever duplicate it self.
$_SESSION['token'] = md5(session_id() . time());
Mainly wondering what the time thing. We're using this to prevent someone from reposting the same comment/review on a review thing when the click refresh. Wanted to make sure it was going to be messing up if the user came back by the site at the same time the next day, didn't really know about what it did. Would the number ever duplicate it self.