Search code examples
phpjqueryequivalence

Unique hash with jQuery that can be reproduced in PHP


I am using a script in wich I need to create a unique Hash with jQuery that I would be able similar to the PHP function uniqid().

Any help ?


Solution

  • What I think you need is the jquery md5 plugin that will create an md5 hash of a string which should shell out a unique hash for any string you give it. check out https://github.com/placemarker/jQuery-MD5

    and then check out http://php.net/manual/en/function.md5.php for the php function to do the same