I use a third-party PHP class to access the API, it has the following code:
$fh = fopen('php://memory', 'w+'); fwrite($fh, $xml); rewind($fh); $ch = curl_init($req->to_url() ); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_PUT, true); curl_setopt($ch, CURLOPT_INFILE, $fh);
In the last line, that is:
curl_setopt($ch, CURLOPT_INFILE, $fh);
I get an error message:
Warning: curl_setopt () [function.curl-setopt]: cannot represent a stream of type MEMORY as a STDIO FILE *
What am I doing wrong?
source share