public static function getRandomString($pLength = 6, $pStrength = 1)
    {
    	$chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    	if ($pStrength >= 1) {
            $chars .= '0123456789';
    	}

    	if ($pStrength >= 2) {
            $strengthChars = '@#$%';
            $chars        .= $strengthChars;
    	}

    	$str = '';
    	for ($i = 0; $i < $pLength; $i++) {
            $str .= $chars[(rand() % strlen($chars))];
    	}

        if ($pStrength >= 2 and ! preg_match('/@|#|\$|%/', $str)) {
            $str = substr($str, 0, -1);
            $str = preg_replace("/^(.{" . (rand() % $pLength) ."})/", "$1" . $strengthChars[rand() % strlen($strengthChars)], $str);
        }

    	return $str;
    }