From d2c906cdc7da57205b96e46b7407b99d55c9eea7 Mon Sep 17 00:00:00 2001 From: Steffen Lange Date: Mon, 22 Apr 2024 18:30:04 +0200 Subject: [PATCH] Modify user agent to make some websites happy --- PatchBase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PatchBase.php b/PatchBase.php index 5445eed..9eeb332 100644 --- a/PatchBase.php +++ b/PatchBase.php @@ -128,7 +128,7 @@ abstract class PatchBase { private function curl(string $url, array $opts) { if ($ch = curl_init()) { curl_setopt($ch, CURLOPT_URL, $url); - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Patchbot/1.0; +http://www.patchbot.de/)'); + curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; +http://www.patchbot.de/) Gecko/20100101 Patchbot/1.0'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);