How to get XML data and convert to JSON with PHP

How could I get the XML data similar to the loaded data at the following location and convert it to JSON with PHP?

I tried this but it returns false:

$url = “”;

$xml = simplexml_load_file($url);


$json = json_encode($xml);
1 Like
Sponsor our Newsletter | Privacy Policy | Terms of Service