<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ashworth Consulting &#187; PHP</title>
	<atom:link href="http://www.ashworthconsulting.com/category/scripts-code/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ashworthconsulting.com</link>
	<description>Web Development &#38; Hosting Solutions in Portland, OR &#38; Vancouver, WA</description>
	<lastBuildDate>Tue, 13 Jul 2010 07:27:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Copyright year kept up to date</title>
		<link>http://www.ashworthconsulting.com/search-engine-optimization/keep-your-copyright-date-up-to-date.html</link>
		<comments>http://www.ashworthconsulting.com/search-engine-optimization/keep-your-copyright-date-up-to-date.html#comments</comments>
		<pubDate>Sun, 09 May 2010 01:22:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Scripts & Code]]></category>
		<category><![CDATA[copyright]]></category>
		<category><![CDATA[year]]></category>

		<guid isPermaLink="false">http://www.ashworthconsulting.com/?p=342</guid>
		<description><![CDATA[Having an outdated copyright date on a website can make it look ignored not only to the search engines, but your visitors as well. If you manage a bunch of sites, whether they’re static or dynamic, that could mean some annual changes, or more often, an outdated copyright date at the bottom of every page.
Did you [...]


Related posts:<ol><li><a href='http://www.ashworthconsulting.com/search-engine-optimization/google-now-supports-cross-domain-canonical-tag.html' rel='bookmark' title='Permanent Link: Google Now Supports Cross-Domain &#8216;Canonical Tag&#8217;'>Google Now Supports Cross-Domain &#8216;Canonical Tag&#8217;</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Having an outdated copyright date on a website can make it look ignored not only to the search engines, but your visitors as well. If you manage a bunch of sites, whether they’re static or dynamic, that could mean some annual changes, or more often, an outdated copyright date at the bottom of every page.</p>
<p>Did you know that there’s an easy way to keep that updated automatically?</p>
<p>On any server that supports PHP, so if you simply drop this code wherever you want, (for example, into your WordPress themes footer.php file) then you’ll automatically have a current copyright date on every page.</p>
<pre class="brush: php;">&amp;copy;
&lt;?php
echo date(&quot;Y&quot;);
?&gt;</pre>
<p>The first line is the © copyright symbol, and what’s inside the brackets generates the date. You can of course add anything to this that you wish, like All Rights Reserved, your company name, your domain, or even links to this site.</p>
<p>What if your server doesn’t support PHP, or for some reason this doesn’t work?</p>
<p>Here’s a <a rel="nofollow" href="http://www.webweaver.nu/tools/copyright-generator/" target="_blank">pretty cool tool</a> that gives you even more flexibility, and although it uses JavaScript, it’s still better than an outdated page. It&#8217;s better for your users as well as the search engines to see that you&#8217;re keeping your website up to date.</p>



Share This Post:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;t=Copyright%20year%20kept%20up%20to%20date" title="Facebook"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Copyright%20year%20kept%20up%20to%20date%20-%20http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html" title="Twitter"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;title=Copyright%20year%20kept%20up%20to%20date&amp;bodytext=Having%20an%20outdated%20copyright%20date%20on%20a%20website%20can%20make%20it%20look%20ignored%20not%20only%20to%20the%20search%20engines%2C%20but%20your%20visitors%20as%20well.%C2%A0If%20you%20manage%20a%20bunch%20of%20sites%2C%20whether%20they%E2%80%99re%20static%20or%20dynamic%2C%20that%20could%20mean%20some%20annual%20changes%2C%20or%20more%20ofte" title="Digg"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html" title="Sphinn"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;title=Copyright%20year%20kept%20up%20to%20date&amp;notes=Having%20an%20outdated%20copyright%20date%20on%20a%20website%20can%20make%20it%20look%20ignored%20not%20only%20to%20the%20search%20engines%2C%20but%20your%20visitors%20as%20well.%C2%A0If%20you%20manage%20a%20bunch%20of%20sites%2C%20whether%20they%E2%80%99re%20static%20or%20dynamic%2C%20that%20could%20mean%20some%20annual%20changes%2C%20or%20more%20ofte" title="del.icio.us"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;title=Copyright%20year%20kept%20up%20to%20date&amp;annotation=Having%20an%20outdated%20copyright%20date%20on%20a%20website%20can%20make%20it%20look%20ignored%20not%20only%20to%20the%20search%20engines%2C%20but%20your%20visitors%20as%20well.%C2%A0If%20you%20manage%20a%20bunch%20of%20sites%2C%20whether%20they%E2%80%99re%20static%20or%20dynamic%2C%20that%20could%20mean%20some%20annual%20changes%2C%20or%20more%20ofte" title="Google Bookmarks"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;title=Copyright%20year%20kept%20up%20to%20date" title="Reddit"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;title=Copyright%20year%20kept%20up%20to%20date" title="StumbleUpon"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html&amp;title=Copyright%20year%20kept%20up%20to%20date" title="Live"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fkeep-your-copyright-date-up-to-date.html" title="Technorati"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.ashworthconsulting.com/feed" title="RSS"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>


<br/><br/>

<p>Related posts:<ol><li><a href='http://www.ashworthconsulting.com/search-engine-optimization/google-now-supports-cross-domain-canonical-tag.html' rel='bookmark' title='Permanent Link: Google Now Supports Cross-Domain &#8216;Canonical Tag&#8217;'>Google Now Supports Cross-Domain &#8216;Canonical Tag&#8217;</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.ashworthconsulting.com/search-engine-optimization/keep-your-copyright-date-up-to-date.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validating a Credit Card</title>
		<link>http://www.ashworthconsulting.com/scripts-code/php/validating-a-credit-card.html</link>
		<comments>http://www.ashworthconsulting.com/scripts-code/php/validating-a-credit-card.html#comments</comments>
		<pubDate>Sat, 16 Jan 2010 07:14:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[credit card]]></category>
		<category><![CDATA[validate]]></category>

		<guid isPermaLink="false">http://www.ashworthconsulting.com/?p=214</guid>
		<description><![CDATA[This little function helps validating a given credit card number is legit.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>This little function helps validating a given credit card number is legit:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> ValidateCreditCardNumber<span style="color: #009900;">&#40;</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^3[47]\d{13}$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//American Express</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^([30|36|38]{2})([0-9]{12})$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Diner's Club</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^6011\d{12}$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Discover Card</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^5[12345]\d{14}$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Mastercard</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^4\d{12}(\d\d\d){0,1}$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Visa</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^30[012345]\d{11}$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Diners</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #000088;">$pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/^3[68]\d{12}$/&quot;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//Diners #2</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pattern</span><span style="color: #339933;">,</span><span style="color: #000088;">$cc_num</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #666666; font-style: italic;">// Not valid</span>
  <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>




Share This Post:


	<a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;t=Validating%20a%20Credit%20Card" title="Facebook"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" /></a>
	<a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=Validating%20a%20Credit%20Card%20-%20http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html" title="Twitter"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" /></a>
	<a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;title=Validating%20a%20Credit%20Card&amp;bodytext=This%20little%20function%20helps%20validating%20a%20given%20credit%20card%20number%20is%20legit." title="Digg"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" /></a>
	<a rel="nofollow"  target="_blank" href="http://sphinn.com/index.php?c=post&amp;m=submit&amp;link=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html" title="Sphinn"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/sphinn.png" title="Sphinn" alt="Sphinn" /></a>
	<a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;title=Validating%20a%20Credit%20Card&amp;notes=This%20little%20function%20helps%20validating%20a%20given%20credit%20card%20number%20is%20legit." title="del.icio.us"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;title=Validating%20a%20Credit%20Card&amp;annotation=This%20little%20function%20helps%20validating%20a%20given%20credit%20card%20number%20is%20legit." title="Google Bookmarks"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" /></a>
	<a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;title=Validating%20a%20Credit%20Card" title="Reddit"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;title=Validating%20a%20Credit%20Card" title="StumbleUpon"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" /></a>
	<a rel="nofollow"  target="_blank" href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html&amp;title=Validating%20a%20Credit%20Card" title="Live"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/live.png" title="Live" alt="Live" /></a>
	<a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.ashworthconsulting.com%2Fscripts-code%2Fphp%2Fvalidating-a-credit-card.html" title="Technorati"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" /></a>
	<a rel="nofollow"  target="_blank" href="http://www.ashworthconsulting.com/feed" title="RSS"><img src="http://www.ashworthconsulting.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" /></a>


<br/><br/>

<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.ashworthconsulting.com/scripts-code/php/validating-a-credit-card.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
