Page 1 of 1

How to capture xml data with php

Posted: Fri Sep 12, 2008 5:08 pm
by malcolmclark2001
I am trying to capture xml data from a remote site. Here is my scenario;

* log on to remote website
* click a button to download an xml list
* the xml file contents are displyed in another browser window (I have to copy and paste the data to a text editor)
- if I view source, I get the calling program code but not the result in the window
- I want to capture the xml code to a variable

This is the line that produces the xml file; I would like to capture the xml code that is produced with this code.
https://www.website.com/dealermaint/quo ... %20Manager" target="_new">

This will open the remote site and display the html code;
fopen("https://www.psndealer.com/dealermaint/quote_xml.asp", "rb");

Can someone help with this. I am so sad :(

Thank You,
Malcolm Clark

Re: How to capture xml data with php

Posted: Fri Sep 12, 2008 5:11 pm
by jaoudestudios
to capture the feed to a variable use

Code: Select all

$data = file('http://www.url.com');