Guest User

Untitled

a guest
Apr 26th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?
  2. function hashCheck($str) {
  3. $sql = "SELECT FROM link WHERE hash='$str'";
  4. $res = mysql_query($res)
  5.  
  6. if (mysql_num_rows($res) > 0) {
  7. return 1;
  8. }
  9.  
  10. else {
  11. return 0;
  12. }
  13. }
  14.  
  15. $i = 1;
  16. while($i == 1) {
  17. $hash = generateHash();
  18. $i = hashCheck($hash)
  19. }
  20.  
  21. }
  22. ?>
Add Comment
Please, Sign In to add comment