In the spirit of Simon's, I created my own conditional get function. My RSS feed finally does conditional get 
<?php
function httpConditionalGet($timestamp, $is_timestamp = true){
if($is_timestamp) $last_modified = gmdate('r', $timestamp);
if((isset($_SERVER['HTTP_IF_NONE_MATCH']) and $_SERVER['HTTP_IF_NONE_MATCH'] == $timestamp) or
($is_timestamp and
isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) and
$_SERVER['HTTP_IF_MODIFIED_SINCE'] == $last_modified)
){
header('HTTP/1.1 304 Not Modified');
exit;
}
if($is_timestamp) header("Last-modified: $last_modified");
header('ETag: '.($is_timestamp ? $timestamp : md5($timestamp)));
}
?>
So, you can pass it a timestamp and it'll use Last-modified headers, but if you explicitly tell it it's not a timestamp then it won't and will just use an ETag instead.
Update (5/7): Note that this code is kind of broken. It was just a quick hack that worked for me, but I didn't test it well because I was (and still am) in the middle of finals. Once I get a chance I'll revise it and fix what's broken. Thanks to Bob Congdon for pointing me to what I did wrong. I explain some of the things in the comments on his post about this.
Update (12/11): I figured I'd post the updated, correct version of this code:
<?php
function httpConditionalGet($thing, $is_timestamp = true){
#thing can be either a timestamp or anything else you want to serve as an etag
#if it's not a timestamp, it's the caller's responsibility to md5 it or whatever
if($is_timestamp) header('Last-modified: '.($lm = gmdate('r', $thing)));
header('ETag: "'.$thing.'"');
$client_etag = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? $_SERVER['HTTP_IF_NONE_MATCH'] : NULL;
$client_lm = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : NULL;
if(($client_etag and $client_etag == '"'.$thing.'"') #etag
or
($is_timestamp and $client_lm and ($client_lm == $lm or $thing == strtotime($client_lm))) #last-modified
) header('HTTP/1.1 304 Not Modified') and exit;
}
?>
It looks much better when it's not word-wrapped.
Thanks for this post, but I was wondering if you could help me with a related question on Conditional GET that I posted on Stackoverflow: http://stackoverflow.com/questions/12892...ead-only-when-the-xml-data-is-updated
I would be very grateful.
(
Your code here might come in useful, but I don't knw how to use it