Ämne: Simple xml
Visa ett inlägg
Oläst 2008-11-09, 18:57 #4
spider spider är inte uppkopplad
Nykomling
 
Reg.datum: Feb 2006
Inlägg: 47
spider spider är inte uppkopplad
Nykomling
 
Reg.datum: Feb 2006
Inlägg: 47
Här kommer ett enkelt exempel på SimpleXML, men har inte anpassat efter Vings XML format, så du får byta title och decription till något passande.


$url = "http://www.ving.se/rss/lms_xml.aspx";

$xml = simplexml_load_file($url);

foreach ($xml ->channel->item as $item) {
echo "<h2>" . $item->title . "</h2>";
echo "

" . $item->description . "</p>";
}
spider är inte uppkopplad   Svara med citatSvara med citat