Hello
I have a J3 site with a few a few custom scripts which I am migrating to J4. Both sites are running PHP7.4
One of those scripts reads an XML file on a remote server and returns the values. This works perfectly on J3 but I cannot get it to work in J4.
Unfortunately I cannot paste the actual url here as it has sensitive data but here is the snippet of code which is causing the problem.
Has something changed in the way J4 handles XML?
$getbal = "http://<the url>.com:8080/getPullDetails.jsp?LOGIN=<Login creds>&PWD=<Login creds>&id=123456";
header('Content-type: text/xml');
$balresult = simplexml_load_file($getbal);
$balance = $balresult->balance;
echo $balance; // This returns 0
echo $getbal; // This returns the correct url and I am able to copy and paste it into a browser and retrieve the correct data.
I have error reporting set to E_ALL but no errors are thrown and neither do any errors appear in the J logs or the server logs and FF dev console does not reveal anything either.
I was able to replicate this on a localhost installation as well as a J4 installation on a different server.
Anyone else come across this or have any ideas?
Thanks so much.
Regards
Anton