我想使用POST方法和curl excute发布我的数据,但结果是
403 - 禁止访问:拒绝访问。
您无权访问 使用您提供的凭据查看此目录或页面。
$request='';
$url='https://app.highwire.com/api/auth';
$header=array('mydata');
$con = curl_init();
curl_setopt($con, CURLOPT_URL, $url);
curl_setopt($con, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($con, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($con, CURLOPT_HEADER, true);
curl_setopt($con, CURLOPT_HTTPHEADER, $header);
curl_setopt($con, CURLOPT_POST, 1);
curl_setopt($con, CURLOPT_POSTFIELDS, $request);
curl_setopt($con, CURLOPT_RETURNTRANSFER, true);
curl_setopt($con, CURLOPT_FAILONERROR, 0);
curl_setopt($con, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6');
$res = curl_exec($con);
curl_close($con);