diff --git a/src/MD_STD.php b/src/MD_STD.php index 8a5504d..7a3a562 100644 --- a/src/MD_STD.php +++ b/src/MD_STD.php @@ -296,14 +296,17 @@ final class MD_STD { $curl = \curl_init(); - \curl_setopt($curl, CURLOPT_URL, $url); - \curl_setopt($curl, CURLOPT_HEADER, false); - \curl_setopt($curl, CURLOPT_CONNECTTIMEOUT_MS, $timeout); //timeout in seconds - \curl_setopt($curl, CURLOPT_TIMEOUT_MS, $timeout); //timeout in seconds - \curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); - // \curl_setopt($curl, CURLOPT_COOKIESESSION, true); - \curl_setopt($curl, CURLOPT_AUTOREFERER, true); - \curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2'); + \curl_setopt_array($curl, [ + CURLOPT_URL => $url, + CURLOPT_HEADER => false, + CURLOPT_CONNECTTIMEOUT_MS => $timeout, //timeout in seconds + CURLOPT_TIMEOUT_MS => $timeout, //timeout in seconds + CURLOPT_FOLLOWLOCATION => true, + CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2_0, + // CURLOPT_COOKIESESSION => true, + CURLOPT_AUTOREFERER => true, + CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2', + ]); /* if (!file_exists(__DIR__ . '/../../curled.txt')) {