Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $id = md5(time().microtime()+$_SERVER['HTTP_USER_AGENT']);
- $i = 4;
- while($i<32){
- $i++;
- $k2 = substr($id,0,$i);
- $q = "SELECT count(id) FROM url where id = '$k2';";
- $res = $c->q($q);
- $fetch = mysql_fetch_array($res);
- if($fetch[0] == 0){
- $id = $k2;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement