标签:form dig url user top digest ini return content
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $linkUrl);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_FAILONERROR, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘POST‘);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, [‘Content-Type:application/x-www-form-urlencoded‘]);
//设置凭证
curl_setopt($ch, CURLOPT_USERPWD, ‘user:pwd‘);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
标签:form dig url user top digest ini return content
原文地址:https://www.cnblogs.com/codeninja/p/11969624.html