문제

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 ?

도움이 되었습니까?

해결책

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

다른 팁

The uniqid function in php is using the current time in milliseconds. It is not possible to generate the same hash on the client, as timing will be different.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top