html.php 607 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. require_once '../vendor/autoload.php';
  3. use codemasher\QRCode\QRCode;
  4. use codemasher\QRCode\QRConst;
  5. //---------------------------------------------------------
  6. echo '<style>
  7. .qrcode{
  8. border-style:none;
  9. border-collapse:collapse;
  10. margin:0;
  11. padding:0;
  12. }
  13. .dark, .light{
  14. margin:0;
  15. padding:0;
  16. width: 1.25mm;
  17. height: 1.25mm;
  18. }
  19. .dark{
  20. background-color: #000;
  21. }
  22. .light{
  23. background-color: #fff;
  24. }
  25. </style>';
  26. // google authenticator
  27. $qr = (new QRCode)->getMinimumQRCode('otpauth://totp/test?secret=B3JX4VCVJDVNXNZ5&issuer=chillerlan.net', QRConst::ERROR_CORRECT_LEVEL_M);
  28. echo $qr->printHTML();