<?PHP
include('../conn/connect.php');
include('../phpqrcode/qrlib.php'); 
//$IP_SERVER="http://".$_SERVER["SERVER_ADDR"]."/Request/";

echo $prod_id = $IP_SERVER."home.php?id=".$_GET['id']; //รหัสสินค้า
$PNG_TEMP_DIR = dirname(__FILE__).DIRECTORY_SEPARATOR.'qr'.DIRECTORY_SEPARATOR; //กำหนด Path Temp
$PNG_WEB_DIR = 'qr/'; //กำหนด Path รูป Qr Code
$filename = $PNG_TEMP_DIR.$_GET['id'].'.png';;
$errorCorrectionLevel = 'L'; 
$matrixPointSize = 9; //ขนาด QR Code
//$filename = $PNG_TEMP_DIR.$prod_id.'.png'; //ไฟล์
QRcode::png($prod_id,$filename, $errorCorrectionLevel, $matrixPointSize, 2);
?>