diff --git a/Scraper.php b/Scraper.php index 035c7a8..7fee40e 100644 --- a/Scraper.php +++ b/Scraper.php @@ -41,11 +41,8 @@ private function fetchContent(): string { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->url); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - curl_setopt($ch, CURLOPT_HTTPHEADER, [ - 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3', - ]); $content = curl_exec($ch); curl_close($ch); return $content;