Posted By

jadedbat on 03/13/09


Tagged

php session md5 uniqid token


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

rezzz
BrianCoyDesign


PHP Token


 / Published in: PHP
 

URL: http://www.thatgrafix.com

PHP 5 needed.

  1. <?php
  2.  
  3. // create the token md5'd and uniqid
  4. $token = md5(uniqid(rand(), TRUE));
  5.  
  6. // store it in a session
  7. $_SESSION['token'] = $token;
  8.  
  9. echo $_SESSION['token'];
  10.  
  11. ?>

Report this snippet  

You need to login to post a comment.