PHP code example of weigreen / ncuportal
1. Go to this page and download the library: Download weigreen/ncuportal 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/ */
weigreen / ncuportal example snippets
// Set up NCUPortal with your application's domain
$ncuPortal = new NCUPortal('your-application-domain');
// Get Auth URL with call back url
$ncuPortal->getAuthUrl('call-back-url');
// Set up NCUPortal with your application's domain
$ncuPortal = new NCUPortal('your-application-domain');
// Check if callback is validate or not
// One time used. Second call will be false
if($ncuPortal->checkLoginValidate()){
echo "Login Real";
// get login account
echo $ncuPortal->getLoginAccount();
}else{
echo "Login is not real >_<";
}