Create token:

"; $user = 'MyLoginUsername'; // Generate a new secret for the user, this secret should be stored with the user in a database or make a static setting $ga = new GoogleAuthenticator(); $secret = $ga->createSecret(); echo "

This personal secret should be stored in a database/user table and should never be known to anybody: $secret

"; echo "
" // Generate QR by using Google Charts. $qrCodeUrl = $ga->getQRCodeGoogleUrl($user, $secret, 'My Environment'); echo "

Scan in Google Authenticator or Microsoft Authenticator" echo ""; ?>