I want to display data from this XML Document
http://xml.amazon.com/onca/xml3?t=jwubo ... age=&f=xml
Should I parse it straight into the my PHP page, or make an XSLT and inclue that?
I was trying to just parse it, but I need a little help.
I saw alot of sample scripts, but only for local xml files.
I know that I need to start off like:
$filename = "sample.xml";
So can I do something like:
$filename = (getURL)"http://dsaasd.com/sample.xml";
Thanks!
Parse External XML File
Moderator: General Moderators
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Re: Parse External XML File
Sure! [php_man]file_get_contents[/php_man]() is you best friend:uswebpro wrote:So can I do something like:
$filename = (getURL)"http://dsaasd.com/sample.xml";
Code: Select all
<?php
$xml_text = file_get_contents('http://dsaasd.com/sample.xml');
?>Regards,
Scorphus.