See what CURL sends from a PHP script
If you are wanting the content can't you just log it? I am doing something similar for my API calls
$ch = curl_init();curl_setopt($ch, CURLOPT_URL, self::$apiURL);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);curl_setopt($ch, CURLOPT_POST, count($dataArray));curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);$logger->info("Sending " . $dataString);self::$results = curl_exec($ch);curl_close($ch);$decoded = json_decode(self::$results);$logger->debug("Received " . serialize($decoded));
Or try
curl_setopt($ch, CURLOPT_STDERR, $fp);