📜  用户代理 cURL php 代码示例

📅  最后修改于: 2022-03-11 14:54:42.084000             🧑  作者: Mango

代码示例1
$config['useragent'] = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0';

curl_setopt($curl, CURLOPT_USERAGENT, $config['useragent']);
curl_setopt($curl, CURLOPT_REFERER, 'https://www.domain.com/');