1. Go to this page and download the library: Download pragmarx/google2fa-qrcode library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pragmarx / google2fa-qrcode example snippets
use PragmaRX\Google2FAQRCode\Google2FA;
$google2fa = new Google2FA();
return $google2fa->generateSecretKey();
$google2fa->setQrcodeService(
new \PragmaRX\Google2FAQRCode\QRCode\Bacon(
new \BaconQrCode\Renderer\Image\SvgImageBackEnd()
)
);
// or
$google2fa = new Google2FA(
new Bacon(
new \BaconQrCode\Renderer\Image\SvgImageBackEnd()
)
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.