我嘗試發送請求(POST請求)到URL,但它返回PHP的捲曲HTTP/1.1 400錯誤的請求
HTTP/1.1 400 Bad Request
content-disposition: attachment; filename=json.json
content-length: 118
content-type: application/json;charset=utf-8
date: Sat, 02 Sep 2017 11:33:56 GMT
server: tsa_o
strict-transport-security: max-age=631138519
vary: Origin
x-connection-hash: 32931e6376249fb1689df3203e847a2b
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-response-time: 108
x-transaction: 0021b7c8005c6a4e
x-tsa-request-body-time: 1
x-xss-protection: 1; mode=block
{ 「capsError」: 「insufficientpermission」, 「將requestId」: 「4f0c87b1349996812fafe51ca6a8197b5bb1e9d560d7dcb8a450ab 3c890e40ac」 }
我的代碼
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => $URL,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => 'postField',
CURLOPT_COOKIEJAR => realpath("cookies/" . $name . ".txt"),
CURLOPT_COOKIEFILE => realpath("cookies/" . $name . ".txt"),
CURLOPT_CONNECTTIMEOUT=>30,
CURLOPT_HEADER => true, // return headers
CURLOPT_SSL_VERIFYPEER=>true,
));
$output = curl_exec($ch);
curl_close($ch);
return $output;
蔭當然從所有後場,但同樣的響應返回 但在瀏覽器EV一切都可以
感謝您的重播這是返回的值HTTP/1.1 400錯誤請求 內容處置:附件;文件名= json.json 內容長度:118 content-type:application/json; charset = utf-8 date:Sat,02 Sep 2017 12:34:26 GMT server:tsa_o strict-transport-security:最大年齡= 631138519 變化:原產 的x連接的散列:ee1dbbca70af69c7815edcb505d16533 的x內容類型選項:nosniff X框選項:SAMEORIGIN 的x響應時間:107 的x事務:00d500270066af4b x-tsa-request-body-time:1 x-xss-protection:1; mode = block' – Looper
'{「capsError」:「權限不足」,「requestId」:「6bcb762e8d2c9039b0eb715f252944924fb2cd90ef3174503d65fe464acb2d87」}' – Looper
@Looper回答我的問題或我無法幫助您。是否使用cURL登錄到您的網址? –