Commit inicial con archivos existentes

This commit is contained in:
2026-01-17 16:14:00 -06:00
parent 48671dc88e
commit 4c48c279de
2539 changed files with 2412708 additions and 0 deletions

19
set_webhook.php Executable file
View File

@@ -0,0 +1,19 @@
<?php
require_once __DIR__ . '/config/config.php';
$botToken = $_ENV['TELEGRAM_BOT_TOKEN'] ?? '';
$webhookUrl = rtrim($_ENV['APP_URL'], '/') . '/telegram_bot_webhook.php?auth_token=' . urlencode($_ENV['TELEGRAM_WEBHOOK_TOKEN'] ?? '');
if (empty($botToken)) {
die("Error: No se ha configurado el TELEGRAM_BOT_TOKEN en el archivo .env");
}
$apiUrl = "https://api.telegram.org/bot{$botToken}/setWebhook?url=" . urlencode($webhookUrl);
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
header('Content-Type: application/json');
echo $response;