开发者

How do I get the date of RSS Feed?

开发者 https://www.devze.com 2023-03-01 13:34 出处:网络
I have RSS feed link, but I need to obtain date from it. Then determine whether to do something based on how close it is to the current time.

I have RSS feed link, but I need to obtain date from it. Then determine whether to do something based on how close it is to the current time.

开发者_JAVA技巧
$date = Get_RSS_Date(); 
$currenttime = getdate();
if $data = too far away from $currenttime then don't display RSS feed.

Make sense?


You can use Magpie_RSS function which will return an array of the RSS properties, and PubDate key contains the timestamp.

0

精彩评论

暂无评论...
验证码 换一张
取 消