tags:

views:

13

answers:

0

I want to display some thematic news in my (php) site news column.

Let's say the site theme is "elevators" and I use GoogleNews already filtered rss:

http://news.google.com/news/search?aq=f&pz=1&cf=all&ned=us&hl=en&q=elevators

Now, in the rss preview I can see in a lot of news with thumbnail pictures.

I use simple SimpleXmlElement and curl like this:

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 0);                    

$data = curl_exec($ch);
curl_close($ch);    


$doc = new SimpleXmlElement($data, LIBXML_NOCDATA); 

$feed   = $xml->channel->item[$i];
$url    = $feed->link;
$title  = $feed->title;
$desc   = $feed->description;

I dont use desc, because google includes all the feed as HTML, and this is not OK.

my question is how to extract thumbnails in a "standard" RSS flux like this?