$code .= mb_substr($this->charset, $rnum, 1,'UTF-8');
This code is working in my system, but when I'm uploading this onto my server it is showing an error.
mbstring functions is not enabled by default, you need to compile PHP with mbstring support (or install a package that has mbstring support). More info: http://es1.php.net/manual/en/mbstring.installation.php