mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-17 15:04:01 +00:00
20 lines
421 B
PHP
20 lines
421 B
PHP
<?php
|
|
|
|
require_once '../vendor/autoload.php';
|
|
|
|
use chillerlan\QRCode\Output\QRImage;
|
|
use chillerlan\QRCode\QRCode;
|
|
use chillerlan\QRCode\QRConst;
|
|
use chillerlan\QRCode\QROptions;
|
|
|
|
$qrOptions = new QROptions;
|
|
$qrOptions->output = new QRImage();
|
|
|
|
$qr = new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', $qrOptions);
|
|
|
|
header('Content-type: image/png');
|
|
|
|
$im = $qr->output();
|
|
imagepng($im);
|
|
imagedestroy($im);
|