<p class="sycode"> <?php <br /> $urlToEncode="http://www.baidu.com"; <br> generateQRfromGoogle($urlToEncode); <br> function generateQRfromGoogle($chl,$widhtHeight ='150',$EC_level='L',$margin='0',$size='6') <br> { <br> $url = urlencode("http://www.baidu.com"); <br> echo '<img src="http://chart.apis.google.com/chart?chs='.%24widhtHeight.'x'.%24widhtHeight.'&cht=qr&chld='.%24EC_level.'%7C'.%24margin.'&chl='.%24chl.'" alt="QR code" widhtheight="'.$size.'">'; <br> } <br> ?> </p>