1. Go to this page and download the library: Download enygma/gauth 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/ */
enygma / gauth example snippets
$g = new \GAuth\Auth();
// set it to 3 seconds
$g->setRange(3);
eful for creating a new Initialization key if needed
$g = new \GAuth\Auth();
$code = $g->generateCode();
var_dump($code);
$holder = '[email protected]';
$name = 'my-app-name';
$g = new \GAuth\Auth('your-initialization-code');
$qrCodeImageData = $g->generateQrImage($holder, $name, 200);
// To use in an image tag:
echo '<img src="data:image/png;base64,'.base64_encode($qrCodeImageData).'"/><br/><hr/>';
// Or just save to a file
file_put_contents('/path/to/qr-file.png', $qrCodeImageData);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.