1. Go to this page and download the library: Download eduplus/attendance 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/ */
eduplus / attendance example snippets
duplus\EduplusAttendance;
// Get today's attendance
$records = EduplusAttendance::setApiKey('your-api-key')
->attendance([
'start' => date('Y-m-d'),
'end' => date('Y-m-d'),
]);
foreach ($records as $r) {
echo "{$r['person_identifier']} — {$r['first_checkin']} to {$r['last_checkout']}\n";
}
use Eduplus\EduplusAttendance;
// Set API key (// Override base URL for staging/local (optional)
EduplusAttendance::setBaseUrl('https://staging.attendance.example.com');
$sdk = EduplusAttendance::setApiKey('your-api-key');
// List attendance with filters
$records = $sdk->attendance([
'start' => '2026-04-01',
'end' => '2026-04-30',
'person_identifier' => 'REG001', // optional
'machine' => '5th_floor', // optional: machine identifier or ID
'tags' => 'students,main_building', // optional: comma-separated
]);
// Attendance for a specific date
$records = $sdk->attendanceForDate('2026-04-30');
// With late/absent status rules
$records = $sdk->attendanceForDate('2026-04-30', [
'late_time' => '09:30', // global: checkin after 09:30 = late
'absent_time' => '10:00', // global: checkin after 10:00 = absent
'rules' => [ // per-person overrides
'REG001' => ['late_time' => '09:00', 'absent_time' => '09:15'],
'REG002' => ['late_time' => '10:00'],
],
]);
// Attendance for a specific person
$records = $sdk->personAttendance('REG001', [
'start' => '2026-04-01',
'end' => '2026-04-30',
]);
$sdk = EduplusAttendance::setApiKey('your-api-key');
// List punches with filters
$punches = $sdk->punches([
'start' => '2026-04-30',
'end' => '2026-04-30',
'person_identifier' => 'REG001',
'machine' => 'main_gate',
'tags' => 'teachers',
]);
// Punches for a specific person
$punches = $sdk->personPunches('REG001', [
'start' => '2026-04-30',
'end' => '2026-04-30',
]);
$records = $sdk->attendance(['start' => '2026-04-30', 'end' => '2026-04-30']);
if (empty($records)) {
echo "No records found or API error\n";
} else {
echo "Found " . count($records) . " records\n";
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.