Advertisement
David_your_friend

identifier var

Dec 17th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Identifier is just a random 40 digit var, used to authenticate the user (as if I submitted the steamid directly people could submit a random steamid when authenticating with socket io) saved in the database with the users steam id and details
  2. $identifierLength = 40;
  3. $todaysDate = date("m.d.y.h.s"); // e.g. "03.10.01"
  4. $identifier = substr(hash('md5', $todaysDate + mt_rand(0,1000000000)), 0, $identifierLength);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement