mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-20 16:40:25 +00:00
16 lines
444 B
PHP
16 lines
444 B
PHP
<?php
|
|
|
|
require_once '../vendor/autoload.php';
|
|
|
|
use chillerlan\QRCode\Output\QRImage;
|
|
use chillerlan\QRCode\Output\QRImageOptions;
|
|
use chillerlan\QRCode\QRCode;
|
|
|
|
$qrImageOptions = new QRImageOptions;
|
|
$qrImageOptions->pixelSize = 10;
|
|
$qrImageOptions->cachefile = 'example_image.png';
|
|
|
|
(new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', new QRImage($qrImageOptions)))->output();
|
|
|
|
echo '<img src="'.$qrImageOptions->cachefile.'" />';
|