| Server IP : 104.21.17.213 / Your IP : 216.73.217.141 Web Server : Apache System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64 User : corbizre ( 1013) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/corbizre/gotofindhomes.com/components/System/Helper/ |
Upload File : |
<?php
/**
* generate random string
* @author keeper
* @category
* @package
* @subpackage
* @copyright Copyright (c) 2005-2013 ITCrimea Ukraine Inc. (http://www.itcrimea.com)
* @license
*/
class System_Helper_RandomString
{
/**
* generate random string
* @author keeper
* @param int $LenghtMin
* @param int $LenghtMax
* @param string $Chars
* @return string random string
*/
public function get($LenghtMin=10, $LenghtMax=10, $Chars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')
{
$arrChars = str_split($Chars);
$intCharsCount = count($arrChars);
$strResult = '';
$Lenght = rand($LenghtMin, $LenghtMax);
for ($i=0;$i<$Lenght;$i++) {
$strResult .= $arrChars[rand(0,$intCharsCount-1)];
}
return $strResult;
}
}