advanced code snippet search
liuran on 11/04/08
hash
11/04/08 04:24am
/** * get a hashed subdir. * * @author liuran */function getHashedDir (){ $key_1 = rand (32768, 65535); $key_2 = microtime (); $key_3 = sha1 (time ()); $sid = md5 ($key_1 . $key_3 . $key_2); $hash_dir = substr ($sid, 0, 2) . '/' . substr ($sid, 15, 2) . '/'; return $hash_dir;}
Report this snippet Tweet
Comment:
You need to login to post a comment.