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().'
'; + +?> + +