2013-02-26 68 views
2

我試圖創建一個使用PHP.I一維條碼創建一維條碼已經能夠創建一個使用谷歌的圖表API這樣的2 d QR碼:使用谷歌圖表API /斑馬線庫

$size = $_REQUEST['size']; 
$string = preg_replace('/\s+/','',$_REQUEST['content']); 
$content  = $string;//$_REQUEST['content']; 
$correction = strtoupper($_REQUEST['correction']); 
$encoding  = $_REQUEST['encoding']; 

//form google chart api link 
$rootUrl = "https://chart.googleapis.com/chart?cht=qr&chs=$size&chl=$content&choe=$encoding&chld=$correction"; 

//print out the image 
echo '<img src="'.$rootUrl.'">'; 

此代碼只是生成QR碼。但我需要條形碼。我需要在參數中更改以將其顯示爲一維條形碼?請注意我正在使用PHP語言和解碼數據使用Zxing庫。請幫助。謝謝

回答