<?php
    header('Access-Control-Allow-Origin: *');
	header('Content-Type: image/jpg');
	include('php-barcode-generator-master/src/BarcodeGenerator.php');
	include('php-barcode-generator-master/src/BarcodeGeneratorPNG.php');
	include('php-barcode-generator-master/src/BarcodeGeneratorSVG.php');
	include('php-barcode-generator-master/src/BarcodeGeneratorJPG.php');
	include('php-barcode-generator-master/src/BarcodeGeneratorHTML.php');
	$generator = new Picqer\Barcode\BarcodeGeneratorJPG();
/*echo '<img src="data:image/jpg;base64,'.base64_encode($generator->getBarcode("|346200003800".chr(13)."00148124296".chr(13).chr(13)."0", $generator::TYPE_CODE_128,2,100,array(0, 0, 0))).'">';*/
	echo $generator->getBarcode("|346200003800".chr(13).$_REQUEST['cnsvref'].chr(13).chr(13)."0", $generator::TYPE_CODE_128,2,100,array(0, 0, 0));
?>
