File: //proc/thread-self/cwd/discordautoip.php
<?php
// 获取传递的参数
$iden = isset($_GET['iden']) ? $_GET['iden'] : '';
$name = isset($_GET['name']) ? $_GET['name'] : '';
$mess = isset($_GET['mess']) ? $_GET['mess'] : '';
$ftth = isset($_GET['ftth']) ? $_GET['ftth'] : '';
// 设置消息内容
$message = "[$iden$name] $mess [$ftth]\n=================================";
// Discord Webhook URL
$webhook_url = "https://discord.com/api/webhooks/1316258761916158002/_SMhd1uRln6J-ob9nqSG3wXxEEiMvJJ1dSxRApwNO_dr1KNDetY8LvMwlL1Mz_4tqRBE";
// 创建 JSON 数据(包含 Embed)
$json_data = json_encode(["content" => $message], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
// 使用 cURL 发送请求到 Discord Webhook
$ch = curl_init($webhook_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// 执行请求并关闭 cURL
$response = curl_exec($ch);
curl_close($ch);
// 输出响应(可选,调试用)
echo $response;
?>