forked from KeyAuth/KeyAuth-Source-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconnection.php
More file actions
34 lines (19 loc) · 1.09 KB
/
Copy pathconnection.php
File metadata and controls
34 lines (19 loc) · 1.09 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
<?php
//error_reporting(0); // disable useless warnings, should turn this on if you need to debug a problem
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "", "main");
// Check connection status
if ($link === false) {
http_response_code(503); // produce non-200 HTTP code so UptimeRobot notifies me MySQL is down
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// set character set to ensure greek characters don't cause issues
mysqli_query($link, "SET NAMES 'utf8'");
$logwebhook = ""; // discord webhook which receives login logs and keys created
$adminwebhook = ""; // discord webhook which receives admin actions
$webhookun = "KeyAuth Logs"; // webhook username
$adminwebhookun = "KeyAuth Admin Logs"; // admin webhook's username
$adminapikey = ""; // api key for api/admin (an api only my staff can use)
$proxycheckapikey = ""; // proxycheck.io API key to check if IP is considered a VPN
$bunnyNetKey = ""; // bunny.net CDN used for custom domains