summaryrefslogtreecommitdiffstats
path: root/inc/download.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2023-11-17 16:02:54 +0100
committerSimon Rettberg2023-11-17 16:02:54 +0100
commita11aa532082cee01305f1981dc6f8b1e79f14d3d (patch)
treec6099a3580ebc7b0f07e6d3a3442967bcb895f9a /inc/download.inc.php
parent[sysconfig] Fix invalid array key access (diff)
downloadslx-admin-a11aa532082cee01305f1981dc6f8b1e79f14d3d.tar.gz
slx-admin-a11aa532082cee01305f1981dc6f8b1e79f14d3d.tar.xz
slx-admin-a11aa532082cee01305f1981dc6f8b1e79f14d3d.zip
[inc/Download] Add user-agent string to avoid 403 from Wikipedia
Diffstat (limited to 'inc/download.inc.php')
-rw-r--r--inc/download.inc.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/download.inc.php b/inc/download.inc.php
index 2eef219c..8358eaa3 100644
--- a/inc/download.inc.php
+++ b/inc/download.inc.php
@@ -28,6 +28,7 @@ class Download
curl_setopt(self::$curlHandle, CURLOPT_AUTOREFERER, true);
curl_setopt(self::$curlHandle, CURLOPT_MAXREDIRS, 6);
curl_setopt(self::$curlHandle, CURLOPT_ACCEPT_ENCODING, '');
+ curl_setopt(self::$curlHandle, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) SLX-Admin/1.0');
curl_setopt(self::$curlHandle, CURLOPT_PROTOCOLS, CURLPROTO_FTP | CURLPROTO_FTPS | CURLPROTO_HTTP | CURLPROTO_HTTPS);
}