* @copyright 2015 Smiley * @license MIT */ require_once '../vendor/autoload.php'; use chillerlan\GoogleAuth\Authenticator; use chillerlan\QRCode\Output\{QRMarkup, QRMarkupOptions, QRImage, QRString,QRStringOptions}; use chillerlan\QRCode\QRCode; #$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; #$data = 'skype://echo123'; $authenticator = new Authenticator; # otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net $data = $authenticator->getUri($authenticator->createSecret(), 'test', 'chillerlan.net'); ?>
'.(new QRCode($data, new QRString))->output().''; // string - text $outputOptions = new QRStringOptions; $outputOptions->type = QRCode::OUTPUT_STRING_TEXT; $outputOptions->textDark = '🔴'; $outputOptions->textLight = 'â•'; echo ''.(new QRCode($data, new QRString($outputOptions)))->output().''; ?>