Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/09/2008, 07:26
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 10 meses
Puntos: 416
Respuesta: recibir y mostrar rss

Tendrias que parsear el archivo XML de las demas paginas web.

Usa SimpleXML.
http://www.php.net/manual/es/book.simplexml.php

Un ejemplo seria:
Código PHP:
<?php
$library 
simplexml_load_file'data.xml' );
echo 
'<table>';
echo 
'<tr>';
echo 
'<th>Title</th><th>Author</th><th>Publisher</th>';
echo 
'</tr>';
foreach( 
$library->book as $book ) {
echo 
'<tr>';
echo 
'<td>' $book->title '</td>';
echo 
'<td>' $book->author '</td>';
echo 
'<td>' $book->publisher '</td>';
echo 
'</tr>';
}
echo 
'</table>';

?>
Y el archivo data.xml vendria asi:

Código:
<?xml version='1.0' encoding='UTF-8'?>
<library>
<book id="1">
<title>Fahrenheit 451</title>
<author>R. Bradbury</author>
<publisher>Del Rey</publisher>
</book>
<book id="2">
<title>The Silmarillion</title>
<author>J.R.R. Tolkien</author>
<publisher>G. Allen Unwin</publisher>
</book>
<book id="3">
<title>1984</title>
<author>G. Orwell</author>
<publisher>Signet</publisher>
</book>
<book id="4">
<title>Frankenstein</title>
<author>M. Shelley</author>
<publisher>Bedford</publisher>
</book>
<book id="5">
<title>The Moon Is a Harsh Mistress</title>
<author>R. A. Heinlein</author>
<publisher>Orb</publisher>
</book>
</library>
Esos codigos los tenia por ahi, y fueron tomados de un tema que anda rondando por ahi (No me acuerdo cual).
xD Solo dando a entender que no es mio.

Última edición por Ronruby; 27/09/2008 a las 07:36