function lc_random_name() { $letters = 'abcdefghijklmnopqrstuvwxyz'; $dirname = '.'; $length = floor(lc_rand(16, 20)); for ($i = 1; $i <= $length; $i++) { $q = floor(lc_rand(1, 26)); $dirname .= $letters[$q]; } return $dirname; }
public function randomQueryMulti($query) { $resource = $this->simpleQuery($query); $num_rows = $this->numberOfRows($resource); if ($num_rows > 0) { $random_row = lc_rand(0, $num_rows - 1); $this->dataSeek($random_row, $resource); return $resource; } else { return false; } }
function lc_encrypt_string($plain) { $password = ''; for ($i = 0; $i < 10; $i++) { $password .= lc_rand(); } $salt = substr(hash('sha256', $password), 0, 2); $password = hash('sha256', $salt . $plain) . '::' . $salt; return $password; }