function createhash(){ $hash = ''; $base = str_shuffle("abcdefghijklmnopqrstuvwxyz1234567890_-"); for($i=0; $i<16; $i++){ $rand = mt_rand(0, 37); $hash .= $base[$rand]; } return($hash); }