PHP code example of mirzahilmi / siamub-auth

1. Go to this page and download the library: Download mirzahilmi/siamub-auth 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/ */

    

mirzahilmi / siamub-auth example snippets



use SIAMUBAuth\SIAMAuth;
use GuzzleHttp\Client;

$client = new Client();
$user = SIAMAuth::authenticate('22515xxxxxxxxxx', 'xxxxxxxx', $client);

echo get_class($user); // SIAMUBAuth\Models\Mahasiswa

echo $user->nim; // 22515xxxxxxxxxx

echo $user->pasFoto;      // https://admisi.ub.ac.id/upload/**/*.jpg
echo $user->nim;          // 22515xxxxxxxxxx
echo $user->nama;         // Pemuja GKM
echo $user->jenjang;      // S1
echo $user->fakultas;     // Ilmu Komputer
echo $user->departemen;   // Sistem Informasi
echo $user->jurusan;      // Teknologi Informasi
echo $user->programStudi; // Teknologi Informasi
echo $user->seleksi;      // Seleksi Mandiri Brawijaya - xxxxx
echo $user->nomorUjian;   // 123456789
echo $user->status;       // 1