// Usage in controllers: Csrf::verify(); // ============================================================ namespace App\Helpers; class Csrf { private const TOKEN_KEY = '_csrf_token'; // ---------------------------------------------------------- // Generate (or return existing) token for this session // ---------------------------------------------------------- public static function token(): string { if (empty($_SESSION[self::TOKEN_KEY])) { $_SESSION[self::TOKEN_KEY] = bin2hex(random_bytes(32)); } return $_SESSION[self::TOKEN_KEY]; } // ---------------------------------------------------------- // Render a hidden input field — paste into every form // ---------------------------------------------------------- public static function field(): string { $token = htmlspecialchars(self::token(), ENT_QUOTES, 'UTF-8'); return ''; } // ---------------------------------------------------------- // Verify the submitted token matches the session token. // Exits with 403 if invalid. // ---------------------------------------------------------- public static function verify(): void { $submitted = $_POST['_csrf_token'] ?? ''; if (!hash_equals(self::token(), $submitted)) { http_response_code(403); exit('Invalid or missing CSRF token. Please go back and try again.'); } } // ---------------------------------------------------------- // Regenerate token (call after login/logout) // ---------------------------------------------------------- public static function regenerate(): void { $_SESSION[self::TOKEN_KEY] = bin2hex(random_bytes(32)); } } WUSL Transcript Request System

How It Works

1. Verify Identity

Enter your registration number and verify via email OTP.

2. Fill Request Form

Choose the transcript type and enter recipient details.

3. Pay Online

Complete payment through the secure payment gateway.

4. Track Progress

Receive email updates and track your request status online.

Transcript Request Types

Option 1

Hard Copy to Local Institution

A physical transcript is dispatched by post directly to a local institution on your behalf.

Option 2

Digital Transcript to Institution

A certified digital transcript is sent directly to a local or foreign institution via email.

Option 3

Sealed Copy for Self-Collection

A certified hard copy in a sealed envelope, prepared for collection from the Examination Division.