<?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>Coders Cult Web Development Blog</title>
	<atom:link href="http://coderscult.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://coderscult.com</link>
	<description>Website development - HTML/XHTML, CSS, Javascript/AJAX, PHP, MySQL</description>
	<lastBuildDate>Thu, 31 Dec 2009 12:58:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Coders Cult Forum Terminated</title>
		<link>http://coderscult.com/blog/2009/12/31/coders-cult-forum-terminated/</link>
		<comments>http://coderscult.com/blog/2009/12/31/coders-cult-forum-terminated/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 12:58:08 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=73</guid>
		<description><![CDATA[






Sorry to mention that I decided to terminate the Coders Cult forum for two main reasons&#8230;

I can no longer maintain it
It&#8217;s more spam than code

It ends with 2009 but this blog on the other hand will be revitalized this 2010!

More power to all of you and HAPPY NEW YEAR!!!



]]></description>
			<content:encoded><![CDATA[<p>Sorry to mention that I decided to terminate the Coders Cult forum for two main reasons&#8230;</p>
<ol>
<li>I can no longer maintain it</li>
<li>It&#8217;s more spam than code</li>
</ol>
<p>It ends with 2009 but this blog on the other hand will be revitalized this 2010!</p>
<p><span id="more-73"></span></p>
<p>More power to all of you and HAPPY NEW YEAR!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/blog/2009/12/31/coders-cult-forum-terminated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Sleep Function</title>
		<link>http://coderscult.com/javascript-ajax/2009/02/05/javascript-sleep-function/</link>
		<comments>http://coderscult.com/javascript-ajax/2009/02/05/javascript-sleep-function/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 09:36:38 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[Javascript/AJAX]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[javascript sleep]]></category>
		<category><![CDATA[javascript sleep function]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=62</guid>
		<description><![CDATA[I&#8217;ll make this short and quick.  I&#8217;ve been searching the web for a Javascript sleep function that works and came across this.  It was presented as a class but what I needed was just a function so I rewrote the code a bit.  Here&#8217;s the end result of my Javascript sleep function [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll make this short and quick.  I&#8217;ve been searching the web for a Javascript sleep function that works and came across this.  It was presented as a class but what I needed was just a function so I rewrote the code a bit.  Here&#8217;s the end result of my Javascript sleep function which I named, well, jsleep.<span id="more-62"></span></p>
<pre lang="javascript">
function jsleep(s){
	s=s*1000;
	var a=true;
	var n=new Date();
	var w;
	var sMS=n.getTime();
	while(a){
		w=new Date();
		wMS=w.getTime();
		if(wMS-sMS&gt;s) a=false;
	}
}
// how to use
alert('in the beginning there was a pause...');
jsleep(3);
alert('3 seconds after... the pause was gone.');
</pre>
<p>I&#8217;ve tested it in Google Chrome, Firefox 3 and Internet Explorer 7.  Works like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/javascript-ajax/2009/02/05/javascript-sleep-function/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Mac vs PC Video</title>
		<link>http://coderscult.com/blog/2008/12/24/new-mac-vs-pc-video/</link>
		<comments>http://coderscult.com/blog/2008/12/24/new-mac-vs-pc-video/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 14:51:59 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mac vs pc video]]></category>
		<category><![CDATA[pc]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=60</guid>
		<description><![CDATA[Nice Mac vs PC Video.


PC should have Linux installed and not Windows.
]]></description>
			<content:encoded><![CDATA[<p>Nice Mac vs PC Video.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/uLbJ8YPHwXM&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/uLbJ8YPHwXM&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><span id="more-60"></span></p>
<p>PC should have Linux installed and not Windows.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/blog/2008/12/24/new-mac-vs-pc-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add HEREDOC Syntax Highlighting for PHP in Bluefish</title>
		<link>http://coderscult.com/php/2008/12/15/how-to-add-heredoc-syntax-highlighting-for-php-in-bluefish/</link>
		<comments>http://coderscult.com/php/2008/12/15/how-to-add-heredoc-syntax-highlighting-for-php-in-bluefish/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 19:28:29 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://coderscult.com/php/2008/12/15/how-to-add-heredoc-syntax-highlighting-for-php-in-bluefish/</guid>
		<description><![CDATA[Bluefish is a pretty good editor for programmers and web designers which supports syntax highlighting for many languages &#8211; PHP included.&#160; While I do like it, there is one little problem when it comes to highlighting PHP code that contains HEREDOC syntax.

I Googled around but failed to find a working solution so I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>Bluefish is a pretty good editor for programmers and web designers which supports syntax highlighting for many languages &#8211; PHP included.&nbsp; While I do like it, there is one little problem when it comes to highlighting PHP code that contains <a target="_blank" href="http://docs.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc">HEREDOC</a> syntax.</p>
<p><span id="more-59"></span></p>
<p>I Googled around but failed to find a working solution so I decided to mess around with regular expressions to add my fix.&nbsp; Guess what?&nbsp; I got it working.&nbsp; Here&#8217;s how you can add HEREDOC syntax highlighting for PHP In Bluefish.
<ol>
<li>In Bluefish, click Edit -&gt; Preferences.&nbsp; Then select the Syntax Highlighting tab</li>
<li>Select &#8220;php&#8221; from the filetype dropdown</li>
<li>Type HEREDOC in &#8220;Pattern Name&#8221;.&nbsp; Don&#8217;t click &#8220;Add&#8221; yet.</li>
<li>Choose &#8220;Only Start Pattern&#8221;</li>
<li>Type <i><u><b>&lt;&lt;&lt;([A-Z]+)\n.*?\n\1;</b></u></i> in the &#8220;Start Pattern&#8221; field</li>
<li>Type <i><u><b>^PHP Block$</b></u></i> in the &#8220;Parentmatch&#8221; field</li>
<li>Type <i><u><b>#009900</b></u></i> in the Foreground color field</li>
<li>Select the &#8220;force non-bold weight&#8221; and &#8220;force non-italic style&#8221; radio buttons</li>
<li>Click &#8220;Add&#8221;</li>
<li>Scroll down to the bottom, click HEREDOC and click &#8220;Up&#8221; until HEREDOC is placed just above &#8220;Operators&#8221;</li>
<li>Now, select &#8220;Operators&#8221; and change its &#8220;Start pattern&#8221; to <i><u><b>[\+\-\*\/\.&lt;&gt;=`!%]+?(?!\?php)</b></u></i></li>
<li>Click &#8220;Apply&#8221; then click &#8220;OK&#8221;</li>
</ol>
<p><a target="_blank" href="http://bluefish.openoffice.nl/">Bluefish</a> should now properly apply syntax highlighting to strings defined the HEREDOC way.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/php/2008/12/15/how-to-add-heredoc-syntax-highlighting-for-php-in-bluefish/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rounded Corners on ALL Browsers</title>
		<link>http://coderscult.com/xhtml-css/2008/11/17/rounded-corners-on-all-browsers/</link>
		<comments>http://coderscult.com/xhtml-css/2008/11/17/rounded-corners-on-all-browsers/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 03:48:30 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[HTML/XHTML and CSS]]></category>
		<category><![CDATA[Javascript/AJAX]]></category>
		<category><![CDATA[rounded corners]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=51</guid>
		<description><![CDATA[Web designers out there!  Have you ever wanted to have rounded corners on the web pages you design but without the use of ugly GIFs or IE-troublesome PNGs?  I&#8217;ve got good news for you and it&#8217;s called jQuery Corners.  Have a look at the screenshot below:


This nifty little jQuery plugin will allow [...]]]></description>
			<content:encoded><![CDATA[<p>Web designers out there!  Have you ever wanted to have rounded corners on the web pages you design but without the use of ugly GIFs or IE-troublesome PNGs?  I&#8217;ve got good news for you and it&#8217;s called jQuery Corners.  Have a look at the screenshot below:</p>
<p><span id="more-51"></span></p>
<p><a href="http://www.atblabs.com/jquery.corners.html"><img src="http://coderscult.com/wp-content/uploads/2008/11/jquery-rounded-corners.jpg" alt="jQuery Rounded Corners" title="jQuery Rounded Corners" width="400" height="146" class="size-full wp-image-54" /></a></p>
<p>This nifty little jQuery plugin will allow you to have anti-aliased rounded corners on your design without the hassle of creating images or worrying about browser compatibility.  Note that it&#8217;s just a jQuery plugin which means that you&#8217;ll also need the <a href="http://jquery.com/">jQuery library</a> which you can get for free.</p>
<p><em>How does jQuery Corners do it?</em></p>
<p>Well, first it checks if the browser supports rounded corners and if so uses the browser&#8217;s built-in rounded corners support.  If the browser however doesn&#8217;t support rounded corners, then jQuery Corners uses its own algorithm to emulate rounded corners.  I took a look at the algorithm&#8217;s generated code and it looks like it&#8217;s using DIVs with varying width and colors to do to the trick.  Simple and elegant but most of all it works.</p>
<p>Give it a try for yourself &#8211; <a href="http://www.atblabs.com/jquery.corners.html">jQuery Corners</a></p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/xhtml-css/2008/11/17/rounded-corners-on-all-browsers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Chrome &#8211; Browser of the Future?</title>
		<link>http://coderscult.com/blog/2008/09/03/google-chrome-browser-of-the-future/</link>
		<comments>http://coderscult.com/blog/2008/09/03/google-chrome-browser-of-the-future/#comments</comments>
		<pubDate>Wed, 03 Sep 2008 03:52:43 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=49</guid>
		<description><![CDATA[Google is very well known in the search industry but over the years, they have grown to become bigger than that.  Google is no longer just search.  It&#8217;s now almost synonymous to innovation.  In times when others try their best to keep their house as clean and as presentable as possible, Google [...]]]></description>
			<content:encoded><![CDATA[<p>Google is very well known in the search industry but over the years, they have grown to become bigger than that.  <a href="http://en.wikipedia.org/wiki/Google">Google</a> is no longer just search.  It&#8217;s now almost synonymous to innovation.  In times when others try their best to keep their house as clean and as presentable as possible, Google somehow decides to just demolish the entire house and build a new and better one.</p>
<p><span id="more-49"></span></p>
<p>Such is Google Chrome.  Even though it&#8217;s built around the <a href="http://en.wikipedia.org/wiki/Webkit">Webkit</a> rendering engine &#8211; the same rendering engine used by Safari and Konqueror, Google still chose to work outside of the box.  As a result, they managed to conjure a browser that&#8217;s apparently faster, more secure and hopefully more reliable.  I haven&#8217;t used the browser myself yet but reading the <a href="http://www.google.com/googlebooks/chrome/index.html">Google Chrome comic book</a> gave me an idea of how they did things.</p>
<p>Being a programmer myself, I believe that Google Chrome is the browser of the future &#8211; assuming of course that they really did all they claimed to have done in the comic book.  But why haven&#8217;t I tried it yet?  Well, sadly because it&#8217;s currently only for <a href="http://en.wikipedia.org/wiki/Windows">Windows</a>.  I will in time test it on my Windows XP and Windows Vista machine but that&#8217;s not in my priority list for now.  Too bad Mac and Linux users will have to wait.  If you want to give Google Chrome (beta) a try then <a href="http://www.google.com/chrome">download it here</a>.  With what they said Google Chrome is, I expect you to make a few adjustments with your browsing habits but it&#8217;ll be worth it.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/blog/2008/09/03/google-chrome-browser-of-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Evangelist Joe Barr Passes Away</title>
		<link>http://coderscult.com/blog/2008/07/12/linux-evangelist-joe-barr-passes-away/</link>
		<comments>http://coderscult.com/blog/2008/07/12/linux-evangelist-joe-barr-passes-away/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 00:44:58 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=47</guid>
		<description><![CDATA[It&#8217;s a sad moment for many Linux lovers when Linux evangelist and Linux.com editor Joe Barr passed away last night &#8211; July 11, 2008 &#8211; in his home.  Many will miss Joe but probably not as much as his wife Susan.  They were married only last year but knew each other for more [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderscult.com/wp-content/uploads/2008/07/joebarr.jpg" alt="" title="Linux Evangelist and Linux.com Editor Joe Barr" width="158" height="158" align="left" style="margin:0 5px 0 0" />It&#8217;s a sad moment for many Linux lovers when Linux evangelist and Linux.com editor Joe Barr passed away last night &#8211; July 11, 2008 &#8211; in his home.  Many will miss Joe but probably not as much as his wife Susan.  They were married only last year but knew each other for more than 10 years according to <a href="http://www.linux.com/feature/141548">Linux.com</a>.</p>
<p><span id="more-47"></span></p>
<p>Aside from being a Linux geek, Joe Barr is also an animal lover who&#8217;s fond of rescuing abandoned puppies.  Knowing his love for animals, his wife Susan requested that donations be made to any animal rescue group in Joe&#8217;s name instead of sending flowers.</p>
<blockquote><p>A former programmer, Barr has worked on everything from microcomputers like the TRS-80 Model I to IBM mainframes with acres of DASD, writing code in more than a dozen languages, including RPG II, 370 ALC, COBOL, BASIC, TIBOL, MASM, and C. Much of that experience coming in his 13 years with Ross Perot&#8217;s EDS.</p>
<p>As a writer, Barr first gained notoriety and, according to Ziff-Davis&#8217; Spencer F. Katt, a cult-like following for his zine, The Dweebspeak Primer.[citation needed] Barr began writing about personal computing in 1994, and primarily about Linux and open source in 1998, when he began writing for IDG&#8217;s LinuxWorld.com. The MPlayer project made him even better known by dedicating a derogatory page to him in their documentation after he wrote a piece entitled MPlayer: the project from hell.</p>
<div align="right"><em>Source: <a href="http://en.wikipedia.org/wiki/Joe_barr">Wikipedia</a></em></div>
</blockquote>
<p>Such a man will surely be missed by the whole opensource community.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/blog/2008/07/12/linux-evangelist-joe-barr-passes-away/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Design with Search Engine Optimization in Mind</title>
		<link>http://coderscult.com/xhtml-css/2008/06/25/web-design-with-search-engine-optimization-in-mind/</link>
		<comments>http://coderscult.com/xhtml-css/2008/06/25/web-design-with-search-engine-optimization-in-mind/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 07:48:48 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[HTML/XHTML and CSS]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=46</guid>
		<description><![CDATA[Web designers and developers often take search engine optimization for granted thinking that it is something that can be done later.  While that is true, I would still say that things will be a lot easier and better if search engine optimization is already incorporated into the architecture of a website before it is [...]]]></description>
			<content:encoded><![CDATA[<p>Web designers and developers often take search engine optimization for granted thinking that it is something that can be done later.  While that is true, I would still say that things will be a lot easier and better if search engine optimization is already incorporated into the architecture of a website before it is even created.</p>
<p><span id="more-46"></span></p>
<p>As a quick and easy to follow guide, here are a few things that web designers have to do when creating website.</p>
<ul>
<li>Don&#8217;t forget to put something descriptive in the Title Tag</li>
<li>Use the H1 tag for the heading instead of just increasing the font size of your heading text.  The content between the H1 tag is a huge factor in SEO.  Remember though to use the H1 tag only once!</li>
<li>Use H2 and H3 tags for subheadings.  That&#8217;s what they&#8217;re meant for.  Again, don&#8217;t just change font-sizes.  Use the header tags accordingly.  As opposed to the H1 tag, you can use H2 and H3 tags as often as you want.</li>
<li>Make use of the &#8220;alt&#8221; attribute in images. The main purpose of the &#8220;alt&#8221; attribute in images is for usability.  Some users just choose to browse with images turned off.  The &#8220;alt&#8221; attribute gives them an idea of what the image is about.  On the other hand, search engines also give credit to the value of the alt attribute so make good use of it.</li>
<li>Avoid Javascript and Flash in navigation.  Search engines like HTML and plain TEXT.  That&#8217;s it.  So if you rely on some fancy javascript or flash for your navigation then you&#8217;re doing it wrong.  Use ordinary HTML links for navigation as much as possible.  You can use CSS to achieve most of the fancy effects you want anyway.</li>
<li>Don&#8217;t use images for paragraphs of text.  I know this is absurd but I&#8217;ve seen many websites who use images to display paragraphs of text.  While people can read it, the search engines can&#8217;t.  Use plain text for text content&#8230; makes sense?</li>
<li>Comply with the W3C standards.  It&#8217;s not just for browser compliance.  It&#8217;s also for the search engines.  You can validate your HTML and CSS code at <a href="http://validator.w3.org/">http://validator.w3.org/</a></li>
</ul>
<p>I&#8217;m sure I missed a few things but the list above should you get started.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/xhtml-css/2008/06/25/web-design-with-search-engine-optimization-in-mind/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Send Email Using PHP</title>
		<link>http://coderscult.com/php/2008/06/14/how-to-send-email-using-php/</link>
		<comments>http://coderscult.com/php/2008/06/14/how-to-send-email-using-php/#comments</comments>
		<pubDate>Sat, 14 Jun 2008 11:26:25 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=45</guid>
		<description><![CDATA[Sending email using PHP is a pretty straightforward task and this short how to will show you exactly how to do that.  The key to sending emails in PHP is the mail() function.  Here&#8217;s how to to use it:
&#60;?php
// example number 1 &#8211; the basic
mail&#40;&#34;email@address.com&#34;,
&#160;&#34;subject of message&#34;,
&#160;&#34;body of message&#34;&#41;;
&#60;span id=&#34;more-45&#34;&#62;&#60;/span&#62;
// example number 2 [...]]]></description>
			<content:encoded><![CDATA[<p>Sending email using PHP is a pretty straightforward task and this short how to will show you exactly how to do that.  The key to sending emails in PHP is the mail() function.  Here&#8217;s how to to use it:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="co1">// example number 1 &#8211; the basic</span><br />
<a href="http://www.php.net/mail"><span class="kw3">mail</span></a><span class="br0">&#40;</span><span class="st0">&quot;email@address.com&quot;</span>,<br />
&nbsp;<span class="st0">&quot;subject of message&quot;</span>,<br />
&nbsp;<span class="st0">&quot;body of message&quot;</span><span class="br0">&#41;</span>;</p>
<p>&lt;span id=<span class="st0">&quot;more-45&quot;</span>&gt;&lt;/span&gt;</p>
<p><span class="co1">// example number 2 &#8211; two recipients and specifying email sender</span><br />
<a href="http://www.php.net/mail"><span class="kw3">mail</span></a><span class="br0">&#40;</span><span class="st0">&quot;email@address.com,email@address.net&quot;</span>,<br />
&nbsp;<span class="st0">&quot;subject of second message&quot;</span>,<br />
&nbsp;<span class="st0">&quot;body of message&quot;</span>,<br />
&nbsp;<span class="st0">&quot;From: sender@email.com<span class="es0">\r</span><span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// example number 3 &#8211; specifying sender and CC recipient</span><br />
<a href="http://www.php.net/mail"><span class="kw3">mail</span></a><span class="br0">&#40;</span><span class="st0">&quot;email@address.com&quot;</span>,<br />
&nbsp;<span class="st0">&quot;subject of second message&quot;</span>,<br />
&nbsp;<span class="st0">&quot;body of message&quot;</span>,<br />
&nbsp;<span class="st0">&quot;From: sender@email.com<span class="es0">\r</span><span class="es0">\n</span>CC: email@address.net<span class="es0">\r</span><span class="es0">\n</span>&quot;</span><span class="br0">&#41;</span>;<br />
<span class="kw2">?&gt;</span></div>
<p>The mail function accepts at least three parameters namely the recipient, subject and the message.  That alone will do most of what you need to do.  The power however of the mail() function is in the option fourth parameter which is for adding additional headers.  It accepts a string which can contain any valid email header.  The second example above shows how to use the fourth header to specify the sender of the email but it can do more than that.</p>
<p>You can specify CC or BCC recipients in it and if you&#8217;re up for the challenge, you can use it to add attachments to your email.  Yes, I know that&#8217;s tough and that really sucks knowing that other scripting languages such as ASP provide a much better and easier way to send emails.</p>
<p>That&#8217;s where the PHPMailer Class comes in.  It&#8217;s a free PHP class that makes sending emails with PHP easier and more powerful.  You can download it <a href="http://phpmailer.codeworxtech.com/">here</a> and here&#8217;s how to use it.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="kw1">include</span><span class="br0">&#40;</span><span class="st0">&quot;class.phpmailer.php&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// initiate the class</span><br />
<span class="re0">$mail</span>=<span class="kw2">new</span> PHPMailer<span class="br0">&#40;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// let&#8217;s use SMTP</span><br />
<span class="re0">$mail</span>-&gt;<span class="me1">IsSMTP</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="re0">$mail</span>-&gt;<span class="me1">Host</span>=<span class="st0">&quot;somehost.com&quot;</span>;<br />
<span class="re0">$mail</span>-&gt;<span class="me1">Username</span>=<span class="st0">&quot;smtpusername&quot;</span>;<br />
<span class="re0">$mail</span>-&gt;<span class="me1">Password</span>=<span class="st0">&quot;smtppassword&quot;</span>;</p>
<p><span class="co1">// sender</span><br />
<span class="re0">$mail</span>-&gt;<span class="me1">From</span>=<span class="st0">&quot;sender@email.com&quot;</span>;<br />
<span class="re0">$mail</span>-&gt;<span class="me1">FromName</span>=<span class="st0">&quot;Billy Joel&quot;</span>;</p>
<p><span class="co1">// subject and message</span><br />
<span class="re0">$mail</span>-&gt;<span class="me1">Subject</span>=<span class="st0">&quot;email subject&quot;</span>;<br />
<span class="re0">$mail</span>-&gt;<span class="me1">Body</span>=<span class="st0">&quot;email message&quot;</span>;</p>
<p><span class="co1">// specify recipients</span><br />
<span class="re0">$mail</span>-&gt;<span class="me1">AddAddress</span><span class="br0">&#40;</span><span class="st0">&quot;email@address.com&quot;</span><span class="br0">&#41;</span>;<br />
<span class="re0">$mail</span>-&gt;<span class="me1">AddAddress</span><span class="br0">&#40;</span><span class="st0">&quot;email@address.net&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="co1">// send the email</span><br />
<span class="re0">$mail</span>-&gt;<span class="me1">Send</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
<span class="kw2">?&gt;</span></div>
<p>The power of PHPMailer is more than that.  Through it you can add attachments to your email, specify an HTML body for your email, etc.  Download it and check out the examples they provide.</p>
<p>Happy emailing and please, don&#8217;t spam. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/php/2008/06/14/how-to-send-email-using-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CakePHP for Faster Development of PHP Applications</title>
		<link>http://coderscult.com/blog/2008/06/11/cakephp-for-faster-development-of-php-applications/</link>
		<comments>http://coderscult.com/blog/2008/06/11/cakephp-for-faster-development-of-php-applications/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 01:56:47 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=43</guid>
		<description><![CDATA[I have to be honest with you guys that I don&#8217;t really use rapid development frameworks such as CakePHP as I am a hardcore type of programmer who loves to write his code in a text editor but I have to admit that they do make application development a lot faster.  I&#8217;ve seen many [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderscult.com/wp-content/uploads/2008/06/cakephp.jpg" alt="" title="CakePHP" width="241" height="174" class="alignleft size-full wp-image-44" align="left" hspace="5" />I have to be honest with you guys that I don&#8217;t really use rapid development frameworks such as CakePHP as I am a hardcore type of programmer who loves to write his code in a text editor but I have to admit that they do make application development a lot faster.  I&#8217;ve seen many of my friends use CakePHP in developing applications.  One of them even managed to come up with a prototype application while in a meeting and was able to present said application to the group before they parted ways.</p>
<p><span id="more-43"></span></p>
<p>Thing is, CakePHP is good for newbies and oldies alike but it does need a little getting used to just as with any other &#8220;out-of-the-box&#8221; solution.  This little learning curve is well compensated by the benefits that you get when you use CakePHP.</p>
<p>So, why am I, a hardcore text-editor programmer, telling you that this is good?  I don&#8217;t use it but I have tried it and geez it was fast.  You create a database according to specs and it maps the database to the application creating the needed code for adding, editing and deleting data.  It practically cuts down code-writing to 50% if you ask me.</p>
<p>Best of all, just like with any opensource project on the net, it&#8217;s free.  So if you like to do things fast and are not so concerned about being intimately connected with your code, then CakePHP will do the job for you.</p>
<p>Check them out at <a href="http://www.cakephp.org/">CakePHP.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/blog/2008/06/11/cakephp-for-faster-development-of-php-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
