View Full Version : If I have a rss feed in csv I may use PHP to get it , well if the feed is in xml I mu
12-20-2008, 10:14 AM
If I have a rss feed in csv I may use PHP to get it , well if the feed is in xml I must also use PHP ? Or may use or may do NOT use PHP ? What to use for:
httprequest.open(...?...); // ?
what to use in PHP file (for xml feeds non csv) ?
12-24-2008, 05:33 PM
I'd start with code like this:
$input = file_get_contents($url) or die('Could not access file: $url');
$xmlobj = simplexml_load_string($input);
This will get the XML document at $url (the rss feed), convert it into a PHP object, and dump out the resulting object so you can see what the structure of the object looks like.
You can use normal object notation ($xmlobj->attribute) to access parts of the rss feed object after that. Mostly these will take the form of php arrays that you can use a foreach loop to process.
Hope this helps!
12-26-2008, 11:05 AM
You mean if I have an rss.xml doc I may or not , use a php file ? correct / no-correct
If I use php I may use PHP arrays and If I do not use php I must use getElementById for the xml file ?
Tell me the way if I have a doc eg rss.xml not use php to parse ?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.