Reply to Re: How old is this RSS file?

Your name:

Reply:


Posted by Philip Ronan on 12/15/05 21:05

"Simon" wrote:

> Hi,
>
> I am trying to parse some RSS files on my site to give a bit of news.
> But some of the RSS are sometimes very old, (or just not updated anymore).
>
> Is there a way of getting the age, (last updated), of a remote file?
> I guess could always store the whole xml in the db and compare it every day
> to see when last it was updated.
> But I was hopping there might be an easier way.
>
> how can I tell how old the rss file really is?

I assume you're using the Curl library to fetch the RSS file. Try setting
CURLOPT_HEADER in a curl_setopt() command, and look for a Last-Modified
header in the returned content. Obviously there's no guarantee that this
header will actually be present.

The best solution would be to keep a local cache of the RSS feed and note
the date when any changes are made to it.

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация