-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php.sample
More file actions
51 lines (45 loc) · 1.86 KB
/
config.php.sample
File metadata and controls
51 lines (45 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
// Copy this file to config.php and fill in your values.
// config.php is listed in .gitignore and must never be committed.
//
// WARNING (A02:2025 — Security Misconfiguration):
// Never use root with an empty password in production.
// Create a dedicated MySQL user with the minimum required privileges:
// CREATE USER 'ctfparser'@'localhost' IDENTIFIED BY 'strong_password';
// GRANT SELECT, INSERT, UPDATE, DELETE ON ctftimeparser.* TO 'ctfparser'@'localhost';
return [
'db' => [
'host' => 'localhost',
'port' => 3306,
'name' => 'ctftimeparser',
'user' => 'db_user',
'pass' => 'db_password',
'charset' => 'utf8mb4',
],
'parser' => [
// How many days ahead to fetch events
'days_ahead' => 14,
// CTFTime API max results per request
'events_limit' => 100,
// cURL timeout in seconds
'request_timeout' => 10,
// Pause between per-event detail requests (seconds)
'sleep_between_requests' => 1,
],
'telegram' => [
// Bot token from @BotFather
'bot_token' => 'YOUR_BOT_TOKEN',
// Supergroup chat ID (negative number, e.g. -1001234567890)
// Send any message to @userinfobot or use getUpdates to find it
'chat_id' => '-1001234567890',
// Topic (thread) ID for the announcements topic
// Forward any message from the topic to @JsonDumpBot to find it
'thread_id' => 123,
// Pause between individual daily-update messages (seconds)
// Telegram global limit is ~30 messages/sec; 2s is safe for a single bot
'sleep_between_messages' => 2,
],
'log_file' => __DIR__ . '/logs/parser.log',
'publisher_log_file' => __DIR__ . '/logs/publisher.log',
];