From PHP I post to an API on .NET (Win Server), using cURL
My last part of code is:
$response = curl_exec($ch);
$responseArray = json_decode($response, true);
When I do:
print_r($response);
I get in the browser:
HTTP/1.1 201 Created Cache-Control: no-cache Pragma: no-cache Content-Length: 64 Content-Type: application/json; charset=utf-8 Expires: -1 Server: Microsoft-IIS/8.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Wed, 05 Aug 2015 12:44:50 GMT {"resultCode":0,"resultMessage":"Success","order_number":123456}
When I do:
print_r($responseArray);
I get blank screen.
So my question is how do I grab the variables from this response?
CURLOPT_HEADER, 0if you're not doing so already. Also tryvar_dump($response)-