<?php
$pddiktiUrl = 'http://103.167.112.188:8082/ws/live2.php';
$pddiktiUsername = '065022';
$pddiktiPassword = '065022ITKASuperAdmin2024!';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $pddiktiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'act' => 'GetToken',
    'username' => $pddiktiUsername,
    'password' => $pddiktiPassword
]));
$res = curl_exec($ch);
$token = json_decode($res, true)['data']['token'];

curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
    'act' => 'GetPerguruanTinggi',
    'token' => $token,
    'filter' => "nama_perguruan_tinggi LIKE '%aspirasi%'",
    'limit' => 10
]));
$res2 = curl_exec($ch);
print_r(json_decode($res2, true));
