• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 228
  • Last Modified:

Parsing XML retrieved from URL

Hi

I have parsed XML in PHP before from standing XML files however the project I am working on at the moment requires something slightly different.

The XML has to be retreived from a .exe file using a URL. The .exe is in the same directory as the php file.

When the URL is called it responds with the XML.

I dont know how to parse this in XML as the only knowledge I have of parsing XML is when it is stored in a .xml file.

Does anyone have any ideas if this can be done and if so how?

Many Thanks,

Daz
0
DAZTOMKINS
Asked:
DAZTOMKINS
2 Solutions
 
dsmileCommented:
If URL's response is valid XML, then the only different is how you use the handle/resource.

For .xml file, you have to open a handle to parse the file as the resource.
For your case, you already have the resource you need.
Just skip the opening file part, the rest is the same.
0
 
dsmileCommented:
In addition, if it's still hard for you, then just save what URL returns to a temp file, then open that temp file as an XML file
0
 
Lukasz ChmielewskiCommented:
What happens when you execute that exe file ?
0
 
Beverley PortlockCommented:
If you are executing the exe by calling a URL then you can load the resulting XML directly via simplexml_load_file (see http://www.pnp.net/simplexml_load_file ).

I think the key to this is how you intend to 'execute' the .exe since many systems will explicity block .exe fies
0
 
DAZTOMKINSAuthor Commented:
Thank you for your help.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now