Ver Mensaje Individual
  #15 (permalink)  
Antiguo 13/04/2011, 07:37
Section1
 
Fecha de Ingreso: diciembre-2003
Mensajes: 173
Antigüedad: 20 años, 4 meses
Puntos: 1
Respuesta: Como leer un xml en php y mostrarlo

Buenas seria algo asi no?

function ejecutar( ){
<?php
$xml = new SimpleXMLElement('http://www.radiocarmelo.eu/temas.xml', null, true);
$song = $xml->Event->Song['title'];
$album = $xml->Event->Song->Album['title'];
$artist = $xml->Event->Song->Artist['name'];
$status = $xml->Event->Announcement['Display'];
$temaonline = "ARTISTA: ".$artist." - TEMA: ".$song." - ALBUM: ".$album."";
?>

}
timer = setTimeout("ejecutar()", 60000);;

Como hago que la funcion ejecute el codigo php? Seria como indico o no?




Un saludo.
__________________
Deja el mundo mejor que como lo encontraste... By B.P.

Última edición por Section1; 13/04/2011 a las 07:43