خدمت شما
کد PHP:
$content = file_get_contents("php://input");
$update = json_decode($content);
$chat_id = $update->message->chat->id; //شناسه چت کاربر
$text = $update->message->text; //پیام ارسالی کاربر
$url = "https://api.telegram.org/bot{$token}/sendMessage?chat_id={$chat_id}&text={$text}";
$res = file_get_contents($url);