Good morning how are you, I hope very well, I would like you to help me a bit in a matter of consuming a web service through a URL that should return a result in JSON, something that does not work and also in the result It just throws me weird symbols, this thing is messing me up a bit.
Here's how I'm doing it, thank you very much.
$ apiUrl = ' link ';
if(ini_get('allow_url_fopen')){
$json = file_get_contents($apiUrl);
} else{
$curl = curl_init($apiUrl);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$json = curl_exec($curl);
print($json);
curl_close($curl);
}