'scan QR code', 'size' =>'100', 'margin' =>'4', 'click' =>'no', 'fgcolor' =>'#000000', 'bgcolor' =>'#FFFFFF' ),$args); extract( $defaults ); self::$args = $defaults; $current_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . ''; $qr_pre_output = ""; $qr_output = ""; $qr_post_output = ""; !empty($content)? $content = strip_tags(trim($content)) : $content = $current_url; if ( $click == "yes" ){ $qr_pre_output = ''; $qr_post_output = ''; } // check if GD is installed on the server if ( extension_loaded( 'gd' ) && function_exists( 'gd_info' ) ) { $fgcolor = str_replace( '#', '', $fgcolor ); $bgcolor = str_replace( '#', '', $bgcolor ); $qr_output = '' . $alt . ''; } else { $qr_image = 'https://chart.googleapis.com/chart?cht=qr&chs=' . $size . 'x' . $size . '&chl=' . $content . '&choe=UTF-8'; $qr_output = '' . $alt . ''; } return $qr_pre_output . $qr_output . $qr_post_output; } } new Magee_Qrcode(); endif;