From 48b84be211b34bb588a64f2a4a9d63727e00e0ab Mon Sep 17 00:00:00 2001 From: smiley Date: Fri, 11 Dec 2015 04:27:14 +0100 Subject: [PATCH] :octocat: --- examples/example.php | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 examples/example.php diff --git a/examples/example.php b/examples/example.php new file mode 100644 index 000000000..ac3f6b110 --- /dev/null +++ b/examples/example.php @@ -0,0 +1,77 @@ + + * @copyright 2015 Smiley + * @license MIT + */ + +require_once '../vendor/autoload.php'; + +use chillerlan\QRCode\QRCode; +use chillerlan\QRCode\QROptions; +use chillerlan\QRCode\Output\QRImage; +use chillerlan\QRCode\Output\QRImageOptions; +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().'" />'; +echo '
'.(new QRCode($data, new QRString))->output().'
'; + +$qrStringOptions = new QRStringOptions; +$qrStringOptions->type = QRCode::OUTPUT_STRING_TEXT; + +echo '
'.(new QRCode($data, new QRString($qrStringOptions)))->output().'
'; + +?> + +