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