From a11aa532082cee01305f1981dc6f8b1e79f14d3d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 17 Nov 2023 16:02:54 +0100 Subject: [inc/Download] Add user-agent string to avoid 403 from Wikipedia --- inc/download.inc.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc') 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); } -- cgit v1.2.3-55-g7522