I have the following XML file from web service:
https://wwwinfo.mfcr.cz/cgi-bin/ares/darv_std.cgi?ico=24766208
and i need to get data from elements, for example i need number "24766208" from element <are:ICO> and i need it in php and i have to use the xml file like link above, i tried this, but thats not working
<?php
$xml = new SimpleXMLElement("https://wwwinfo.mfcr.cz/cgi-bin/ares/darv_std.cgi?ico=24766208", LIBXML_NOCDATA, true);
foreach ($xml->Odpoved as $result) {
$ico = $result->are:ICO;
}
echo $ico;
?>
thank you for answers
source https://stackoverflow.com/questions/72776687/reading-web-service-xml-link-with-php
No comments:
Post a Comment