public static function getQRcode($string, $width = 150, $height = 150, $attributes = [])
    {
        $protocol = 'http://';
        if (self::isHttps()) {
            $protocol = 'https://';
        }

        $attr = trim(self::arrayToString($attributes));
        $apiUrl = $protocol.'chart.apis.google.com/chart?chs='.$width.'x'.$height.'&cht=qr&chl='.urlencode($string);

        return '<img src="'.$apiUrl.'" '.$attr.' />';
    }