'Lunes',
'Tuesday' => 'Martes',
'Wednesday' => 'Miércoles',
'Thursday' => 'Jueves',
'Friday' => 'Viernes',
'Saturday' => 'Sábado',
'Sunday' => 'Domingo',
'January' => 'Enero',
'February' => 'Febrero',
'March' => 'Marzo',
'April' => 'Abril',
'May' => 'Mayo',
'June' => 'Junio',
'July' => 'Julio',
'August' => 'Agosto',
'September' => 'Septiembre',
'October' => 'Octubre',
'November' => 'Noviembre',
'December ' => 'Diciembre'
);
foreach($fechaesp as $a => $b) $texto = str_replace($a,$b,$texto);
return $texto;
}
?>
Noticias
channel->item as $item)
{
if ($i < 10) {
preg_match('@src="([^"]+)"@', $item->description, $match);
$parts = explode('', $item->description);
$feeds[$i]['title'] = mb_convert_encoding((string) $item->title, "HTML-ENTITIES", "UTF-8");
$feeds[$i]['link'] = (string) $item->link;
$feeds[$i]['link'] = preg_replace('#http://news.google.com(.*?)url=(.*?)#s', '',$feeds[$i]['link']);
$feeds[$i]['image'] = $match[1];
$feeds[$i]['image'] = str_replace('//', 'http://', $feeds[$i]['image']);
$feeds[$i]['story'] = mb_convert_encoding(strip_tags($parts[2]), "HTML-ENTITIES", "UTF-8");
$stringCut = substr($feeds[$i]['story'], 0, $chars);
$feeds[$i]['story'] = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...
Leer Más »';
$feeds[$i]['date'] = (string) $item->pubDate;
$feeds[$i]['date'] = date("l, d F o g:i A", strtotime($feeds[$i]['date']));
$feeds[$i]['date'] = fechaesp($feeds[$i]['date']);
echo '';
print($feeds[$i]['title']);
echo '';
print($feeds[$i]['date']);
echo '
';
echo '

';
print($feeds[$i]['story']);
echo '
';
$i++;
}
}
?>