Why cUrl returns http 500?

Hello! Tell me why cURL returns HTTP/1.1 500 Internal Server??

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://hdrezka.ag/films/");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, THIS, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
 'Host: hdrezka.ag',
 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
 'Accept-Language: ru-ru,ru;q=0.8,en-US;q=0.5,en;q=0.3',
 'Accept-Encoding: gzip, deflate',
 'Connection: keep-alive',
 'Upgrade-Insecure-Requests: 1'
));
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
$output = curl_exec($ch);
curl_close($ch);
echo $output;
exit();


Send all the same headers as the browser
5c9ca7e0b4f04786832829.png
March 19th 20 at 09:00
1 answer
March 19th 20 at 09:02
Solution
because the site is blocked in Russia

Find more questions by tags PHP