Advertisement
LrdArc

Untitled

May 30th, 2016
290
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2. /* Addon Function */
  3. function checkhash( $hash ) {
  4.     global $db;
  5.     $f = $db->f( 'TABLE_NAME', 'hash', 'WHERE hash=?', $hash );
  6.     return ( $f ) ? true : false;
  7. }
  8.  
  9. function gethash() {
  10.     $hash = randstr( 6 );
  11.     if ( checkhash( $hash ) ) $hash = gethash();
  12.     return $hash;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement