Friday, March 9, 2012

How to Generate QR Code with PHP Using Google API

<?
$urlToEncode
="http://superiorwebsys.com";
generateQRwithGoogle($urlToEncode);
function 
generateQRwithGoogle($chl,$widhtHeight ='150',$EC_level='L',$margin='0') {
    
$url urlencode($url);
    echo 
'<img src="http://chart.apis.google.com/chart?chs='.$widhtHeight.
'x'.$widhtHeight.'&cht=qr&chld='.$EC_level.'|'.$margin.
'&chl='.$chl.'" alt="QR code" widhtHeight="'.$size.
'" widhtHeight="'.$size.'"/>';
}
?>

No comments:

Post a Comment

Thank you for your Comment....

Popular Posts