Я использую cURL с подробной опцией, чтобы сделать запрос на публикацию. Мой код выглядит следующим образом:
<?php
$postArray = [
"id" => 1
]
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postArray);
curl_setopt($ch, CURLOPT_VERBOSE, true);
$verbose = fopen('php://temp', 'w+');
curl_setopt($ch, CURLOPT_STDERR, $verbose);
curl_setopt($ch, CURLOPT_TIMEOUT, 60000);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$result = curl_exec($ch);
curl_close($ch);
rewind($verbose);
$verboseLog = stream_get_contents($verbose);
var_dump($verboseLog);
?>
Подробные данные приведены ниже:
* Trying XX.XX.XXX.XX:443...
* Connected to payclix.com (XX.XX.XXX.XX) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /home/...../cacert.pem
CApath: /home/...../cacert.pem
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: OU=Domain Control Validated; CN=www.XXXX.com
* start date: Sep 7 19:34:13 2018 GMT
* expire date: Sep 7 19:34:13 2020 GMT
* subjectAltName: host "XXXX.com" matched cert's "XXXX.com"
* issuer: C=US; ST=Arizona; L=Scottsdale; O=XXXX.com, Inc.; OU=http://certs.XXXX.com/repository/; CN=Go xxxx Secure Certificate Authority - G2
* SSL certificate verify ok.
> POST /ws/XXXX_svc.cfc HTTP/1.1
Host: XXXX.com
Accept: */*
Content-Length: 559
Content-Type: multipart/form-data; boundary=------------------------2d6a4005bcfe2086
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Sun, 12 Apr 2020 18:18:32 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 mod_jk/1.2.41
< Strict-Transport-Security: max-age=15768000
< Set-Cookie: CFID=5056427; Expires=Mon, 13-Apr-2020 04:18:32 GMT; Path=/; Secure; HttpOnly
< Set-Cookie: CFTOKEN=XXXXX; Expires=Mon, 13-Apr-2020 04:18:32 GMT; Path=/; Secure; HttpOnly
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: ALLOW-FROM https://foundationtitlemelbourne.com/
< Referrer-Policy: same-origin
< Transfer-Encoding: chunked
< Content-Type: text/html;charset=UTF-8
<
* Connection #0 to host XXXX.com left intact
var_dump показывает подробные данные запроса, но не отображает данные сообщения, отправленные с запросом.
Есть ли способ исправить это, пожалуйста?
Спасибо.