<?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; Scripts &amp; Code</title>
	<atom:link href="http://www.ashworthconsulting.com/category/scripts-code/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>YouTube Pro Wordpress Plugin</title>
		<link>http://www.ashworthconsulting.com/search-engine-optimization/youtube-pro-wordpress-plugin.html</link>
		<comments>http://www.ashworthconsulting.com/search-engine-optimization/youtube-pro-wordpress-plugin.html#comments</comments>
		<pubDate>Tue, 13 Jul 2010 07:25:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Marketing]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Scripts & Code]]></category>

		<guid isPermaLink="false">http://www.ashworthconsulting.com/?p=449</guid>
		<description><![CDATA[YouTube is nothing less than an online video phenomenon and if you aren&#8217;t already using it as a tool to promote yourself or your online content, you should really give it some thought.
Having already served up over 1.73 billion video views and 45 terabytes of video footage to the world, YouTube is everyone&#8217;s first port of [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><a rel="nofollow" href="http://codecanyon.net/item/youtube-pro/112363?ref=ashworth102680"><img class="alignnone size-full wp-image-452" title="youtube-pro-screenshot" src="http://www.ashworthconsulting.com/wp-content/uploads/2010/07/youtube-pro-screenshot.jpg" alt="" width="590" height="300" /></a></p>
<p><strong><a rel="nofollow" href="http://www.youtube.com/">YouTube</a> is nothing less than an online video phenomenon</strong> and if you aren&#8217;t already using it as a tool to promote yourself or your online content, you should really give it some thought.</p>
<p>Having already served up over <a rel="nofollow" href="http://www.micropersuasion.com/2006/08/youtube_by_the_.html">1.73 billion video views and 45 terabytes</a> of video footage to the world, YouTube is everyone&#8217;s first port of call when they want to search for online video.</p>
<p>While it might not be the best featured or even best quality service for video producers, it is by a long shot the most popular. If you are a blogger, marketer, film maker or any other kind of online publisher or entrepreneur, you stand to gain a lot by getting some exposure on YouTube. Especially if you leverage <a rel="nofollow" href="http://codecanyon.net/item/youtube-pro/112363?ref=ashworth102680">YouTube Wordpress plugins</a>.</p>
<p>But how do you get your content noticed, when there are 6.1 million videos for your audience to choose from? Certainly, there is no replacement for making or aggregating great content, but there are several ways that you can make your presence felt, and drive traffic back to your own website.</p>
<p>There are tricks to getting the best out of YouTube from a marketing perspective and there are an assortment of YouTube strategies and features that you can use to raise your profile, whether you create your own videos, or act as a video NewsMaster, selecting and grouping other people&#8217;s video for your niche-audience.</p>
<p><a rel="nofollow" href="http://codecanyon.net/item/youtube-pro/112363?ref=ashworth102680">YouTube Pro</a> is an impressive new plugin for WordPress 3.0! Upload, edit and delete your movies without leaving your blog. Also, you can change the appearance of your player with full customizations.</p>
<p><span class="youtube">
<object width="480" height="360">
<param name="movie" value="http://www.youtube.com/v/yo8674K-8wQ&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;hd=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/yo8674K-8wQ&amp;rel=1&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;hd=1" type="application/x-shockwave-flash" allowfullscreen="true" width="480" height="360"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=yo8674K-8wQ&fmt=18">www.youtube.com/watch?v=yo8674K-8wQ</a></p></p>
<p>Once you have imported all your movies over from YouTube to WordPress, you never have to leave your blog again. Basically you can do everything you need to from within Wordpress and it becomes your sole point of entry for interfacing with your YouTube videos.</p>
<p><strong>Features</strong></p>
<ul>
<li>1-Click install</li>
<li>Import your videos from YouTube</li>
<li>Add new videos</li>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong></p>
<li><span style="font-weight: normal;">Edit your existing videos</span></li>
<li><span style="font-weight: normal;">Delete videos from WordPress or YouTube</span></li>
<li><span style="font-weight: normal;">Custom player appearance</span></li>
<li><span style="font-weight: normal;">Quick video insert into your post using the WordPress “Upload/Insert” feature.</span></li>
<li><span style="font-weight: normal;">Use YouTube Pro for your videos and others.*</span></li>
<li><span style="font-weight: normal;">Update checker</span></li>
<p></strong></ul>
<p><strong> </strong></p>
<p><strong> </strong></p>
<p><strong>The package<br />
</strong>When you download the plugin from <a rel="nofollow" href="http://codecanyon.net/item/youtube-pro/112363?ref=ashworth102680">CodeCanyon</a> it will contain the YouTube Pro plugin. The most optimal Zend package has been included within the plugin in order to use Zend in combination with WordPress.</p>
<p><strong>Want to see more?</strong></p>
<p><strong> </strong>Feel free to <a rel="nofollow" href="http://codecanyon.net/item/youtube-pro/112363?ref=ashworth102680">leave a comment</a> with a feature request. The author will do whatever they can in order to assist you!</p>
<p><strong>Support</strong></p>
<p><strong> </strong>Please <a rel="nofollow" href="http://codecanyon.net/item/youtube-pro/112363?ref=ashworth102680">use the forum</a> or use the contact form on my profile page:<a rel="nofollow" href="http://forum.philohermans.com/">http://forum.philohermans.com/</a></p>
<p><strong>Zend Framework</strong></p>
<p>YouTube Pro makes use of the Zend Framework. This is required to make use of the YouTube API . See the following link for the Zend Requirements:</p>
<p><a rel="nofollow" href="http://zendframework.com/manual/en/requirements.introduction.html">http://zendframework.com/manual/en/requirements.introduction.html</a></p>
<p><strong>PHP5 is Required</strong></p>
<p><strong> </strong>This plugin is only supported by PHP 5 .2.4 or later.</p>
<p><strong>WordPress 3.0 Only</strong></p>
<p><strong> </strong>This plugin makes use of the latest features of WordPress 3.0. Therefore it will not work with older versions.</p>
<p><strong>Developer Key</strong></p>
<p><strong> </strong>In order to upload movies to YouTube, you need to have a developer key. You can get your developer key <a rel="nofollow" href="http://code.google.com/apis/youtube/dashboard/">here</a></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%2Fyoutube-pro-wordpress-plugin.html&amp;t=YouTube%20Pro%20Wordpress%20Plugin" 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=YouTube%20Pro%20Wordpress%20Plugin%20-%20http%3A%2F%2Fwww.ashworthconsulting.com%2Fsearch-engine-optimization%2Fyoutube-pro-wordpress-plugin.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%2Fyoutube-pro-wordpress-plugin.html&amp;title=YouTube%20Pro%20Wordpress%20Plugin&amp;bodytext=%0D%0A%0D%0AYouTube%20is%20nothing%20less%20than%20an%20online%20video%20phenomenon%20and%20if%20you%20aren%27t%20already%20using%20it%20as%20a%20tool%20to%20promote%20yourself%20or%20your%20online%20content%2C%20you%20should%20really%20give%20it%20some%20thought.%0D%0A%0D%0AHaving%20already%20served%20up%20over%C2%A01.73%20billion%20video%20views%20an" 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%2Fyoutube-pro-wordpress-plugin.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%2Fyoutube-pro-wordpress-plugin.html&amp;title=YouTube%20Pro%20Wordpress%20Plugin&amp;notes=%0D%0A%0D%0AYouTube%20is%20nothing%20less%20than%20an%20online%20video%20phenomenon%20and%20if%20you%20aren%27t%20already%20using%20it%20as%20a%20tool%20to%20promote%20yourself%20or%20your%20online%20content%2C%20you%20should%20really%20give%20it%20some%20thought.%0D%0A%0D%0AHaving%20already%20served%20up%20over%C2%A01.73%20billion%20video%20views%20an" 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%2Fyoutube-pro-wordpress-plugin.html&amp;title=YouTube%20Pro%20Wordpress%20Plugin&amp;annotation=%0D%0A%0D%0AYouTube%20is%20nothing%20less%20than%20an%20online%20video%20phenomenon%20and%20if%20you%20aren%27t%20already%20using%20it%20as%20a%20tool%20to%20promote%20yourself%20or%20your%20online%20content%2C%20you%20should%20really%20give%20it%20some%20thought.%0D%0A%0D%0AHaving%20already%20served%20up%20over%C2%A01.73%20billion%20video%20views%20an" 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%2Fyoutube-pro-wordpress-plugin.html&amp;title=YouTube%20Pro%20Wordpress%20Plugin" 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%2Fyoutube-pro-wordpress-plugin.html&amp;title=YouTube%20Pro%20Wordpress%20Plugin" 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%2Fyoutube-pro-wordpress-plugin.html&amp;title=YouTube%20Pro%20Wordpress%20Plugin" 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%2Fyoutube-pro-wordpress-plugin.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/search-engine-optimization/youtube-pro-wordpress-plugin.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
