Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- function hashCheck($str) {
- $sql = "SELECT FROM link WHERE hash='$str'";
- $res = mysql_query($res)
- if (mysql_num_rows($res) > 0) {
- return 1;
- }
- else {
- return 0;
- }
- }
- $i = 1;
- while($i == 1) {
- $hash = generateHash();
- $i = hashCheck($hash)
- }
- }
- ?>
Add Comment
Please, Sign In to add comment