$c = curl_init();
curl_setopt($c, CURLOPT_URL, “https://rc.aaa.xxx.y.co.jp”);
…(省略)
// 詳細情報を出力する設定
curl_setopt($c, CURLOPT_VERBOSE, 1);
// SSL 証明書の情報を出力する設定
curl_setopt($c, CURLOPT_CERTINFO, TRUE);
// SSL通信
$handle_err = fopen(“/tmp/curl_s.log”, “w+”);
curl_setopt($c, CURLOPT_STDERR, $handle_err);
–出力サンプル–
About to connect() to rc.aaa.xxx.y.co.jp port 443 (#0)
Trying 133.237.129.110… * connected
Connected to rc.aaa.xxx.y.co.jp (133.333.111.222) port 443 (#0)
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Server certificate:
subject: CN=rc.aaa.xxx.y.co.jp,O=”Rakuten Group, Inc.”,L=Setagaya-ku,ST=Tokyo,C=JP
start date: Sep 11 00:00:00 2025 GMT
expire date: Sep 10 23:59:59 2026 GMT
common name: rc.aaa.xxx.y.co.jp
issuer: CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1,O=DigiCert Inc,C=US
POST /es/2.0/order/searchOrder/ HTTP/1.1
// ヘッダ部分
$handle_header = fopen(“/tmp/curl_h.log”, “w+”);
curl_setopt($c, CURLOPT_WRITEHEADER, $handle_header);
–出力サンプル–
HTTP/1.1 200 OK
date: Sun, 22 Feb 2026 00:52:52 GMT
server: istio-envoy
content-type: application/json;charset=UTF-8
cache-control: no-cache, no-store
// レスポンス結果
$handle_file = fopen(“/tmp/curl.log”, “w+”);
curl_setopt($c, CURLOPT_FILE, $handle_file);
–出力サンプル–
“PaginationResponseModel”:{“totalRecordsAmount”:1455,”totalPages”:2,”requestPage”:1}}
…(省略)
$response = curl_exec($c);