<?php
if($_GET['code']){
	require_once('inc/barcode/BarcodeGenerator.php');
	require_once('inc/barcode/BarcodeGeneratorJPG.php');
	$generator = new BarcodeGeneratorJPG();
	$imgStr = $generator->getBarcode($_GET['code'], $generator::TYPE_CODE_128);
	header('Content-type: image/jpeg');
	echo $imgStr;
}else{
	header('404 Not Found');
}