Articles & Code Snippets


QR Codes via Google API

The simplest way to to generate QR Codes using Google API


The simplest way to to generate QR Codes using Google API

<?php
$urlToEncode="http://www.negraru.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.'"/>';
}
?>
web


Archives

Just feel like saying Hi?

  1 (903) NEGRARU phone
  email