File: //proc/thread-self/cwd/chick.php
<?php
session_start();
if (!isset($_GET['nfc_scanned']) || $_GET['nfc_scanned'] !== 'true') {
echo "無效的訪問,請通過 NFC 掃描標籤訪問。";
exit();
}
// Step 3: 生成當前的日期時間並格式化成 `tagtime`
$tagtime = date('Y/m/d'); // 格式化日期為 YYYY/MM/DD
$encrypted_tagtime = base64_encode($tagtime); // 將日期進行 base64 加密
// Step 4: 重定向到 FileMaker WebDirect,並附加 `tagtime` 參數
$target_url = "https://192.168.88.10/fmi/webd/YSNET_MIS?script=chicknfc¶m=$encrypted_tagtime";
header("Location: $target_url");
exit();
?>