Solved

Parsing XML retrieved from URL

Posted on 2011-03-10
5
225 Views
Last Modified: 2012-08-13
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
Comment
Question by:DAZTOMKINS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Accepted Solution

by:
dsmile earned 250 total points
ID: 35104534
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
 
LVL 13

Expert Comment

by:dsmile
ID: 35104540
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
 
LVL 27

Expert Comment

by:Lukasz Chmielewski
ID: 35106057
What happens when you execute that exe file ?
0
 
LVL 34

Assisted Solution

by:Beverley Portlock
Beverley Portlock earned 250 total points
ID: 35106505
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
 

Author Closing Comment

by:DAZTOMKINS
ID: 35133495
Thank you for your help.
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question