24.06.2011, 18:38
(
Последний раз редактировалось rjjj; 24.06.2011 в 19:20.
)
It's not a PHP Forum .
I think It will solve your problem .
I hope that i have helped .
I think It will solve your problem .
Код:
function num_hash($buf) { $length = strlen($buf); $s1 = 0; $s2 = 0; $n = 0; while($n < $length) { $s1 = ($s1 + ord($buf[$n])) % 65521; $s2 = ($s2 + $s1) % 65521; $n++; } return ($s2 << 16) + $s1; }