@@ -104,7 +104,7 @@ |
||
| 104 | 104 | // Handle the error here, e.g. by logging it |
| 105 | 105 | $attempts++; |
| 106 | 106 | if ($attempts == $max_attempts) { |
| 107 | - // Reached max attempts, so throw an exception to indicate failure |
|
| 107 | + // Reached max attempts, so throw an exception to indicate failure |
|
| 108 | 108 | throw new Exception('Failed to retrieve data after ' . $max_attempts . ' attempts.'); |
| 109 | 109 | } |
| 110 | 110 | sleep(1); // Wait for 1 second before retrying |
@@ -6,7 +6,7 @@ discard block |
||
| 6 | 6 | include "modules/ranking.php"; // Include the ranking module |
| 7 | 7 | include "modules/singbox.php"; // Include the singbox module |
| 8 | 8 | |
| 9 | -function addHeader ($subscription, $subscriptionName) { |
|
| 9 | +function addHeader($subscription, $subscriptionName) { |
|
| 10 | 10 | $headerText = "#profile-title: base64:" . base64_encode($subscriptionName) . " |
| 11 | 11 | #profile-update-interval: 1 |
| 12 | 12 | #subscription-userinfo: upload=0; download=0; total=10737418240000000; expire=2546249531 |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | rmdir($folder); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | -function seprate_by_country($configs){ |
|
| 32 | +function seprate_by_country($configs) { |
|
| 33 | 33 | $configsArray = explode("\n", $configs); |
| 34 | 34 | $configLocation = ""; |
| 35 | 35 | $output = []; |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | if ($configType === "vmess") { |
| 40 | 40 | $configName = parse_config($config, "vmess", true)['ps']; |
| 41 | - } elseif ($configType === "vless" || $configType === "trojan" ){ |
|
| 41 | + } elseif ($configType === "vless" || $configType === "trojan") { |
|
| 42 | 42 | $configName = parse_config($config, $configType)['hash']; |
| 43 | - } elseif ($configType === "ss"){ |
|
| 43 | + } elseif ($configType === "ss") { |
|
| 44 | 44 | $configName = parse_config($config, "ss")['name']; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if (stripos($configName, "RELAY |
|