$ch = curl_init();
//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_URL, $url);
$certificate_location = "/etc/ssl/certs/ca-certificates.crt";
curl_setopt($ch, CURLOPT_CAINFO, $certificate_location);
curl_setopt($ch, CURLOPT_CAPATH, $certificate_location);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($auth_request, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_arguments);
// Set HTTP Header for POST request
curl_setopt($auth_request, CURLOPT_HTTPHEADER, array(
"Content-Type: application/json"
));
//execute post
$result = curl_exec($ch);
Isn’t posting anything to $url
print_r($_REQUEST);
print_r($_POST);
are both set to array() in the receiving url
$json_arguments is set to soemething like
{“api_user_id”:“aa”,“api_password”:“bb”,“api_signature”:“cc”,“type”:“GetPropertyTypes”}
I can’t see anything wrong with it.
Thanks