file: ultimo_foro.php
Código PHP:
<?php
class RssReader {
var $url;
var $data;
function RssReader ($url){
$this->url;
$this->data = implode ("", file ($url));
}
function get_items (){
preg_match_all ("/<item .*>.*<\/item>/xsmUi", $this->data, $matches);
$items = array ();
foreach ($matches[0] as $match){
$items[] = new RssItem ($match);
}
return $items;
}
}
class RssItem {
var $title, $url, $description;
function RssItem ($xml){
$this->populate ($xml);
}
function populate ($xml){
preg_match ("/<title> (.*) <\/title>/xsmUi", $xml, $matches);
$this->title = $matches[1];
preg_match ("/<link> (.*) <\/link>/xsmUi", $xml, $matches);
$this->url = $matches[1];
preg_match ("/<description> (.*) <\/description>/xsmUi", $xml, $matches);
$this->description = $matches[1];
}
function get_title (){
return $this->title;
}
function get_url (){
return $this->url;
}
function get_description (){
return $this->description;
}
}
$rss = new RssReader ("http://miweb/foro/rss.php");
foreach ($rss->get_items () as $item){
printf ('<a href="%s">%s</a><br />%s<br /><br />',
$item->get_url (), $item->get_title (), $item->get_description ());
}
?>
user en "cyberLink Power DVD 10.0"
<p><b><span class="style1">cyberLink Power DVD 10.0 </span></b><div align="center"><img src="https://www.compusoftonline.com/ventasdesoftware/images/CYBERLINK%20POWER%20DVD%2010%20ULTRA.png" /></div><b>Descripción</b>:<span class="style7">Exelente Programa para reproducir<br /> formatos DVD. Selección de idioma<br /> ¡Fácil de usar, mirá pelÃ*culas comodo<br /> en tu pc! </p> <p><a href="http://letitbit.net/download/9291.98e0ad189ca64b0ccd01f9583a/CyberLink_PowerDVD_10.0_Build_1516_by_juegosk.com. ar.rar.html">Descargar</a></span> </p>
osea, se ve horrible jeje.
en el index yo pongo asi:
Código PHP:
<?php include 'ultimo_foro.php'; ?>
desde ya gracias por su ayuda!