* @copyright 2015 Smiley * @license MIT */ require_once '../vendor/autoload.php'; use chillerlan\QRCode\Output\QRMarkup; use chillerlan\QRCode\Output\QRMarkupOptions; use chillerlan\QRCode\QRCode; use chillerlan\QRCode\Output\QRImage; use chillerlan\QRCode\Output\QRString; use chillerlan\QRCode\Output\QRStringOptions; $data = 'otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net'; #$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; #$data = 'skype://echo123'; ?> QRCode test output().'" />'; // markup - svg echo '
'.(new QRCode($data, new QRMarkup))->output().'
'; // markup - html $outputOptions = new QRMarkupOptions; $outputOptions->type = QRCode::OUTPUT_MARKUP_HTML; echo '
'.(new QRCode($data, new QRMarkup($outputOptions)))->output().'
'; // string - json echo '
'.(new QRCode($data, new QRString))->output().'
';

// string - text
$outputOptions = new QRStringOptions;
$outputOptions->type = QRCode::OUTPUT_STRING_TEXT;

echo '
'.(new QRCode($data, new QRString($outputOptions)))->output().'
'; ?>