Use firefox for user agent in MD_STD::runCurl()
This commit is contained in:
parent
b16a6762e4
commit
27b70a88c9
@ -187,9 +187,14 @@ final class MD_STD {
|
|||||||
\curl_setopt($curl, CURLOPT_TIMEOUT_MS, $timeout); //timeout in seconds
|
\curl_setopt($curl, CURLOPT_TIMEOUT_MS, $timeout); //timeout in seconds
|
||||||
\curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
\curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||||
\curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
\curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
|
||||||
\curl_setopt($curl, CURLOPT_USERAGENT, 'md-bot/1.0');
|
// \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');
|
||||||
$result = \curl_exec($curl);
|
$result = \curl_exec($curl);
|
||||||
|
|
||||||
|
// if ($err = curl_errno($curl)) echo $err;
|
||||||
|
// if ($errmsg = curl_error($curl)) echo $errmsg;
|
||||||
|
|
||||||
\curl_close($curl);
|
\curl_close($curl);
|
||||||
if (\is_bool($result)) return "";
|
if (\is_bool($result)) return "";
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user