<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: updater code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Tue, 07 Oct 2008 11:14:57 GMT</pubDate>
    <description>DZone Snippets: updater code</description>
    <item>
      <title>PHP Copyright Updater</title>
      <link>http://snippets.dzone.com/posts/show/3652</link>
      <description>// PHP Copyright Updater&lt;br /&gt;// by Evan Walsh&lt;br /&gt;// NothingConcept.com&lt;br /&gt;&lt;br /&gt;This code will automatically change the copyright on your site as the year changes.  Tested and approved by me.&lt;br /&gt;&lt;br /&gt;Just call this in one of your PHP files by including the file with this code in it:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;//Licensed under the GPL v2&lt;br /&gt;//by Evan Walsh of nothingconcept.com&lt;br /&gt;function copyright($site,$year) {&lt;br /&gt;    $current = date(Y);&lt;br /&gt;    if($year == $current) { $eyear = $year; }&lt;br /&gt;    else { $eyear = "$year - $current"; }&lt;br /&gt;    echo "All content &amp;copy; $eyear $site";&lt;br /&gt;}&lt;br /&gt;?&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Example: &lt;?php include('functions.php'); ?&gt;&lt;br /&gt;&lt;br /&gt;Then place &lt;?php copyright("Sitename","2007"); ?&gt; or something similar in the place you want the copyright to display.&lt;br /&gt;&lt;br /&gt;Simple as that.</description>
      <pubDate>Fri, 09 Mar 2007 22:41:51 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3652</guid>
      <author>GreyFox (Evan Walsh)</author>
    </item>
  </channel>
</rss>
