<?php
$clientId = '用戶端ID';
$apiUrl = 'https://api.chc.edu.tw/school-oauth/authorize?client_id='.$clientId.'&response_type=code&state=abc';
if (isset($_GET['data'])) {
$data = json_decode($_GET['data']);
print_r($data);
}
else {
header('Location: '.$apiUrl);
}
==============================================
取回
stdClass Object | |
( | |
[school_no] => 074xxx | |
[username] => 帳號 | |
[role] => teacher | |
[name] => 姓名 | |
[edu_key] => 4208f4152cb215d19edfa78d4e85ae2ccee65497edxxxxxxxxxxxx | |
[title_name] => 職稱 | |
[title_kind] => 教師兼組長 | |
[group] => 系統管理員 | |
) |
沒有留言:
張貼留言