Code: Select all
$url = "http://mywebservices.ddns.net:49156/PrdEXObt?ID=fb8e8d73-cf98-461c-94c0-3c5cbfd02b86&Prd=1034-12V&Fmt=XML&Enc=8";
$headers = [
'Accept-Encoding: gzip'
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$curl_response = curl_exec($ch);
curl_close($ch);
var_dump($curl_response);
When I consume the web service from a RESTful client, the information appears correctly, example:
What is missing or what error do I have in my code? What is a viable solution?
Thanks