justcreations Posted January 21, 2008 Share Posted January 21, 2008 Hi people, I'm trying to use simpleXML in php. But struck a problem with the way my XML is generated. In a browser the URL below will generate the XML appropiately, but in php i cant get the asp generated xml content. Ive just stated with php, so my noob debuging abilities leads me to think that because the URL is compounded with parameters for the asp to generate the xml, functions like fopen() or file_get_contents() dont give me the generated XML content. http://rtt.metroinfo.org.nz/RTT/Public/Utility/File.aspx?Name=RoutePositionET.xml&ContentType=SQLXML&PlatformNo=38719 I will really appreciate some advice, even if some can tell me what a compounded URL like the one above is called. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/87023-trying-to-open-a-xml-file/ Share on other sites More sharing options...
ratcateme Posted January 21, 2008 Share Posted January 21, 2008 have you looked at this it should get ur XML and phrase it into an array http://www.phpfreaks.com/script/view/202.php Scott. Quote Link to comment https://forums.phpfreaks.com/topic/87023-trying-to-open-a-xml-file/#findComment-445022 Share on other sites More sharing options...
pdkv2 Posted January 21, 2008 Share Posted January 21, 2008 Try this <?php $s = simplexml_load_file('http://rtt.metroinfo.org.nz/RTT/Public/Utility/File.aspx?Name=RoutePositionET.xml&ContentType=SQLXML&PlatformNo=38719'); foreach($s->row as $email ){ echo $email."<br>"; } print_r($s); ?> Regards Sharad. Quote Link to comment https://forums.phpfreaks.com/topic/87023-trying-to-open-a-xml-file/#findComment-445023 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.