<?php
$ts = time();
//$ts = getlastmod();
doConditionalGet($ts);

function str2time($str) {
    /* 
    * Convert a HTTP-date string to Unix time
    * 念のためセミコロン以降を削除してから処理する
    * http://bakera.jp/hatomaru.aspx/ebi/topic/586 を参照
    */
    $str = preg_replace( '/;.*/', '', $str);
    if (!preg_match("/GMT/", $str)) $str .= ' GMT';
    return strtotime($str);
}

function doConditionalGet($timestamp) {

    /*
    * A PHP implementation of conditional get, see 
    * http://fishbowl.pastiche.org/archives/001132.html
    * http://as-is.net/blog/archives/000956.html
    */

    // Convert to GMT format
    $last_modified = gmdate('D, d M Y H:i:s T', $timestamp);

    // Create ETag
    $etag = '"'.md5($last_modified).'"';

    // Send the headers
    header("Last-Modified: $last_modified");
    header("ETag: $etag");

    // See if the client has provided the required headers
    $if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ?
        // UNIX タイムスタンプに変換
        str2time( stripslashes( $_SERVER['HTTP_IF_MODIFIED_SINCE'])) : false;

    $if_none_match = isset($_SERVER['HTTP_IF_NONE_MATCH']) ?
        stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) : false;

    if (!$if_modified_since && !$if_none_match)
        return;

    // At least one of the headers is there - check them
    if ($if_none_match && $if_none_match != $etag)
        return; // etag is there but doesn't match

    if ($if_modified_since && $if_modified_since < $timestamp)
        return; // Unix タイムスタンプ(int)で比較する

    // Nothing has changed since their last request - serve a 304 and exit
    header('HTTP/1.1 304 Not Modified');
    exit;
}

?>

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Free Webgraphic Club</title>
        <link>http://sozai.7gates.net/en/</link>
        <description>free web graphics
</description>
        <language>ja</language>
        <copyright>Copyright 2008</copyright>
	
	<lastBuildDate>Mon, 21 Jul 2008 08:13:15 +0900</lastBuildDate>
	<docs>http://www.rssboard.org/rss-specification</docs>
        
	
        <item>
            <title>rss feed  icon1</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-rssfeed01.jpg" width="65" height="65" alt="rss feed icon sample image"  /></div><div class="sz12 lh150">rss feed icons for white background.Aqua type.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/rss%20feed%20%E3%82%A2%E3%82%A4%E3%82%B3%E3%83%B3%E7%B4%A0%E6%9D%90/</link>
            <guid>http://sozai.7gates.net/en/docs/rss%20feed%20%E3%82%A2%E3%82%A4%E3%82%B3%E3%83%B3%E7%B4%A0%E6%9D%90/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0999)Others</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">aqua</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">rss　feed</category>
            
            <pubDate>Mon, 21 Jul 2008 08:13:15 +0900</pubDate>
        </item>
        
        <item>
            <title>3D rotating arrow icon</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-arrow21.gif" width="65" height="65" alt="3ｄarrow icon sample image"  /></div><div class="sz12 lh150">Though sample image is not moving,3D rotating arrow animated icons.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/3d_rotate_arrow/</link>
            <guid>http://sozai.7gates.net/en/docs/3d_rotate_arrow/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0101)Arrow Icon</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0199)Animated Icons</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">3D</category>
            
            <pubDate>Mon, 14 Jul 2008 01:14:50 +0900</pubDate>
        </item>
        
        <item>
            <title>pianoicon1</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-music08.gif" width="65" height="65" alt="piano　 icon sample image"  /></div><div class="sz12 lh150">piano  icon ,32px×32px </div>]]></description>
            <link>http://sozai.7gates.net/en/docs/pianoicon1/</link>
            <guid>http://sozai.7gates.net/en/docs/pianoicon1/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0107)Notes and Instruments</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">piano</category>
            
            <pubDate>Fri, 11 Jul 2008 00:35:23 +0900</pubDate>
        </item>
        
        <item>
            <title>gold medal plate</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-plate02.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150">
 gold medal plate. for both white and black background.2type.JPEG.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/gold_edal_plate/</link>
            <guid>http://sozai.7gates.net/en/docs/gold_edal_plate/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0200)free buttons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0201)Buttons and Plates</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">gold medal</category>
            
            <pubDate>Wed, 26 Mar 2008 07:33:14 +0900</pubDate>
        </item>
        
        <item>
            <title>forward-looking mini car icon</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-car02.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
forward-looking mini car icons.16×16pixel transparentgif.less than 1KB,pixel art icon.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/mini-car-icon/</link>
            <guid>http://sozai.7gates.net/en/docs/mini-car-icon/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0108)Vehicles</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">car</category>
            
            <pubDate>Fri, 14 Mar 2008 15:23:00 +0900</pubDate>
        </item>
        
        <item>
            <title>pushpin icon1</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-ico07.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
pushpin icon.16×16pixel.transparentgif pixel art icon</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/pushpin_icon01/</link>
            <guid>http://sozai.7gates.net/en/docs/pushpin_icon01/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0102)General</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0106)Stationery　and Pins</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">pin</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">pushpin</category>
            
            <pubDate>Sat, 01 Mar 2008 20:01:28 +0900</pubDate>
        </item>
        
        <item>
            <title>tag icon</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-tag01.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
mini tag icons.16×16pixel transparentgif.less than 1KB.pixel art icon</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/%E3%82%BF%E3%82%B0%E3%82%A2%E3%82%A4%E3%82%B3%E3%83%B3%E7%B4%A0%E6%9D%901/</link>
            <guid>http://sozai.7gates.net/en/docs/%E3%82%BF%E3%82%B0%E3%82%A2%E3%82%A4%E3%82%B3%E3%83%B3%E7%B4%A0%E6%9D%901/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0102)General</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">blog</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">tag</category>
            
            <pubDate>Sat, 01 Mar 2008 10:18:47 +0900</pubDate>
        </item>
        
        <item>
            <title>car icon 1</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-car01.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
20 mini car icons.16×16pixel transparentgif. less than 1KB. these are pixel arts.fit for any background colors</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/caricon1/</link>
            <guid>http://sozai.7gates.net/en/docs/caricon1/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0108)Vehicles</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">car</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">mini size</category>
            
            <pubDate>Thu, 28 Feb 2008 16:57:45 +0900</pubDate>
        </item>
        
        <item>
            <title>clover icon</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-flower04.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
Clover icons.16×16pixel transparentgif.How about colorful clovers?</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/clover_icon/</link>
            <guid>http://sozai.7gates.net/en/docs/clover_icon/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0103)Flowers and Plants</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">clover</category>
            
            <pubDate>Wed, 27 Feb 2008 10:57:33 +0900</pubDate>
        </item>
        
        <item>
            <title>arming pin icon</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-ico06.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
arming pin icons.16×16pixel.10colors×2type=20. pixel art icon</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/arming_pin_icon/</link>
            <guid>http://sozai.7gates.net/en/docs/arming_pin_icon/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0106)Stationery　and Pins</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">pin</category>
            
            <pubDate>Tue, 12 Feb 2008 22:31:17 +0900</pubDate>
        </item>
        
        <item>
            <title>notes icon _7</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-music01.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
animated type of notes icon １ 16×16pixel .10colors×4type</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/notesicon_7/</link>
            <guid>http://sozai.7gates.net/en/docs/notesicon_7/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0107)Notes and Instruments</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0199)Animated Icons</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">animated</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">notes</category>
            
            <pubDate>Mon, 11 Feb 2008 00:10:51 +0900</pubDate>
        </item>
        
        <item>
            <title>notes icon _5</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-music05.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
a note on a square with border line.16×16pixel transparent gif.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/notesicon_5/</link>
            <guid>http://sozai.7gates.net/en/docs/notesicon_5/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0107)Notes and Instruments</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">notes</category>
            
            <pubDate>Sun, 10 Feb 2008 18:03:35 +0900</pubDate>
        </item>
        
        <item>
            <title>notes icon _4</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-music04.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
icon that a white note on colord circle.16×16pixel transparentgif. white mat. for white or light background colors.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/notesicon_4/</link>
            <guid>http://sozai.7gates.net/en/docs/notesicon_4/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0107)Notes and Instruments</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">notes</category>
            
            <pubDate>Sat, 09 Feb 2008 22:21:31 +0900</pubDate>
        </item>
        
        <item>
            <title>notes icon _3</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-music03.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
notes icon 16×16pixel transparentgif,10colors ×4type.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/notesicon_3/</link>
            <guid>http://sozai.7gates.net/en/docs/notesicon_3/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0107)Notes and Instruments</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">notes</category>
            
            <pubDate>Fri, 08 Feb 2008 23:52:03 +0900</pubDate>
        </item>
        
        <item>
            <title>notes icon _2</title>
            <description><![CDATA[<div class="sample"><img src="http://sozai.7gates.net/img/samples/sample-music02.gif" width="65" height="65" alt="sample image"  /></div><div class="sz12 lh150"> 
note icons 16×16pixel transparentgif. fit for any background colors.</div>]]></description>
            <link>http://sozai.7gates.net/en/docs/notesicon_2/</link>
            <guid>http://sozai.7gates.net/en/docs/notesicon_2/</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">0100)Free Icons</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">0107)Notes and Instruments</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">notes</category>
            
            <pubDate>Thu, 07 Feb 2008 20:47:22 +0900</pubDate>
        </item>
        
	    </channel>
</rss>

