Advertisement
Guest User

multiOTP

a guest
Sep 8th, 2014
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.    
  3.      require_once('multiOTP/multiotp.class.php');
  4.      
  5.      $multiotp = new Multiotp('MyPersonalEncryptionKey');
  6.      
  7.      $multiotp->EnableVerboseLog();
  8.      $multiotp->SetUser($_POST['username']);
  9.      $result = $multiotp->CheckToken($_POST['token']);
  10.      if (0 == $result)
  11.      {
  12.          echo "Authentication accepted.";
  13.      }
  14.      else
  15.      {
  16.          echo "Authentication rejected.";
  17.      }
  18.      
  19.      echo $result;
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement