Php 错误:CURL请求未通过
错在哪里? curl请求未通过。 我正在尝试传递一个POST请求,该请求在单击站点上的特定按钮时发生。 在本地打开php脚本(index.php)时收到的消息。 在我向其发送操作请求的站点上未发生Php 错误:CURL请求未通过,php,curl,Php,Curl,错在哪里? curl请求未通过。 我正在尝试传递一个POST请求,该请求在单击站点上的特定按钮时发生。 在本地打开php脚本(index.php)时收到的消息。 在我向其发送操作请求的站点上未发生 curl_setopt( $myCurl, CURLOPT_URL, 'https://api.opskins.com/ICart/AddToCart/v1/' ); curl_setopt( $myCurl, CURLOPT_HTTPHEADER, array ( 'origin: https:/
curl_setopt( $myCurl, CURLOPT_URL, 'https://api.opskins.com/ICart/AddToCart/v1/' );
curl_setopt( $myCurl, CURLOPT_HTTPHEADER, array (
'origin: https://opskins.com',
'accept-encoding: gzip, deflate, br',
'accept-language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7',
'user-agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36',
'content-type: application/x-www-form-urlencoded; charset=UTF-8',
'accept: */*',
'referer: https://opskins.com/?loc=shop_browse&app=730_2',
'authority: api.opskins.com',
'cookie: bla=bla; many_many=bukaff',
));
curl_setopt($myCurl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($myCurl, CURLOPT_PROXYPORT, '8000');
curl_setopt($myCurl, CURLOPT_PROXY, '1.1.1.1');
curl_setopt($myCurl, CURLOPT_PROXYUSERPWD, 'xxxx:xxxxxxxx');
curl_setopt( $myCurl, CURLOPT_POST, 1 );
curl_setopt($myCurl, CURLOPT_POSTFIELDS, array(
'saleid'=>'181679504',
'location'=>'shop_browse',
'amount'=>'192',
'internal_search'=>'',
'csrf'=>'xxxxxxxxxxxxxxxxxxxx'
));
curl_setopt ($cn, CURLOPT_SSL_VERIFYPEER, FALSE);
$response = curl_exec($myCurl);
echo $response;
echo 'error curl: ' . curl_error($myCurl);
curl_close($myCurl);
?>
curl\u setopt($ch,CURLOPT\u SSL\u VERIFYPEER,FALSE)代码>
纠正一下
curl\u setopt($myCurl,CURLOPT\u SSL\u VERIFYPEER,FALSE)代码>