getContentType()); echo $qrCode->writeString(); } function show($qrcode) { $qrCode = new QrCode("pre-order qrcode\ngenerated by s.a.s\n" . "[". $qrcode ."]"); $qrCode->setSize(300); // Set advanced options $qrCode->setWriterByName('png'); $qrCode->setMargin(10); $qrCode->setEncoding('UTF-8'); $qrCode->setErrorCorrectionLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::HIGH)); $qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); $qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); $qrCode->setLabel('S.A.S PreOrder', 16, FCPATH .'/assets/fonts/noto_sans.otf', LabelAlignment::CENTER); $qrCode->setLogoPath(FCPATH . '/assets/images/logo-sas.jpg'); $qrCode->setLogoWidth(150); $qrCode->setValidateResult(false); header('Content-Type: '.$qrCode->getContentType()); echo $qrCode->writeString(); } function index() { $qrCode = new QrCode("TUV345"); $qrCode->setSize(300); // // Set advanced options $qrCode->setWriterByName('png'); $qrCode->setMargin(10); $qrCode->setEncoding('UTF-8'); $qrCode->setErrorCorrectionLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::HIGH)); $qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); $qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); $qrCode->setLabel('S.A.S PreOrder', 16, FCPATH .'/assets/fonts/noto_sans.otf', LabelAlignment::CENTER); $qrCode->setLogoPath(FCPATH . '/assets/images/logo-sas.jpg'); $qrCode->setLogoWidth(150); $qrCode->setValidateResult(false); header('Content-Type: '.$qrCode->getContentType()); echo $qrCode->writeString(); } } ?>