> Is there a way to check the timestamp on an rss
> feed before actually having to retrieve the
> entire feed? I thought I had remembered something
> in the past... but have no idea where I saw it..

Someone else said no, but there actually is.  It relies on the publisher
including a last-modified header in their HTTP response headers, but here's
some code to get you started.  Once you have the last modified date, you can
make a decision (in code) as to whether you want to download the rest of the
feed or not.  Watch for line wrapping.


-Justin Scott


--- Code Below ---

<!--- Get the headers for the URL. --->
<cfhttp
url="http://mxblogspace.journurl.com/users/admin/index.cfm?mode=article&entr
y=1853&template=rss-full" method="HEAD"> 

<!--- When was this last modified? --->
<cfif structKeyExists(cfhttp.responseHeader, "last-modified")>
        <cfset variables.last_modified =
parseDateTime(cfhttp.responseheader["last-modified"])>
<cfelse>
        <cfset variables.last_modified = now()>
</cfif>

<!--- When was it last modified? --->
<cfoutput>#variables.last_modified#</cfoutput>

<!--- Do a date comparison against the last time
      you pulled, and if needed, pull the rest
      of the feed as usual. --->


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202682
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to