<?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"
	>

<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>
	<pubDate>Tue, 01 Jul 2008 00:06:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<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>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>
		</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 - 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 - 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 - 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 - 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>
		</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>
		</item>
		<item>
		<title>PHP cURL Cookies Example</title>
		<link>http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/</link>
		<comments>http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/#comments</comments>
		<pubDate>Tue, 20 May 2008 13:01:00 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[PHP cURL]]></category>

		<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=42</guid>
		<description><![CDATA[Want to learn how to use PHP cURL with Cookies?  Well, it&#8217;s pretty simple so let&#8217;s go see the code but first let&#8217;s make a scenario&#8230;
Say we have a page called &#8216;cookiepage.php&#8217; in a particular website that checks for the cookie set by the homepage and will only return the proper output if the [...]]]></description>
			<content:encoded><![CDATA[<p>Want to learn how to use PHP cURL with Cookies?  Well, it&#8217;s pretty simple so let&#8217;s go see the code but first let&#8217;s make a scenario&#8230;</p>
<p>Say we have a page called &#8216;cookiepage.php&#8217; in a particular website that checks for the cookie set by the homepage and will only return the proper output if the cookie exists.  How do you do it?  Here&#8217;s how&#8230;</p>
<p><span id="more-42"></span></p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="coMULTI">/* STEP 1. let&#8217;s create a cookie file */</span><br />
<span class="re0">$ckfile</span> = <a href="http://www.php.net/tempnam"><span class="kw3">tempnam</span></a> <span class="br0">&#40;</span><span class="st0">&quot;/tmp&quot;</span>, <span class="st0">&quot;CURLCOOKIE&quot;</span><span class="br0">&#41;</span>;</p>
<p><span class="coMULTI">/* STEP 2. visit the homepage to set the cookie properly */</span><br />
<span class="re0">$ch</span> = curl_init <span class="br0">&#40;</span><span class="st0">&quot;http://somedomain.com/&quot;</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_COOKIEJAR, <span class="re0">$ckfile</span><span class="br0">&#41;</span>; <br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="re0">$output</span> = curl_exec <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;</p>
<p><span class="coMULTI">/* STEP 3. visit cookiepage.php */</span><br />
<span class="re0">$ch</span> = curl_init <span class="br0">&#40;</span><span class="st0">&quot;http://somedomain.com/cookiepage.php&quot;</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_COOKIEFILE, <span class="re0">$ckfile</span><span class="br0">&#41;</span>; <br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="re0">$output</span> = curl_exec <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;</p>
<p><span class="coMULTI">/* here you can do whatever you want with $output */</span><br />
<span class="kw2">?&gt;</span></div>
<p>Just in case you weren&#8217;t able to catch what we did in the above example, here&#8217;s a short explanation.</p>
<ul>
<li>STEP 1 creates a temporary cookie file using the tempnam() function.</li>
<li>STEP 2 loads the homepage and saves the cookie in our temporary cookie file. The key here is this line:
<p><strong>curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile);</strong>
</li>
<li>STEP 3 loads cookiepage.php with the saved cookie with this line:
<p><strong>curl_setopt ($ch, CURLOPT_COOKIEFILE, $ckfile);</strong>
</li>
</ul>
<p>Sleek and simple ei?  Hope this PHP cURL Cookie example helped you out!</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/php/php-curl/2008/05/20/php-curl-cookies-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Post Data with cURL in PHP</title>
		<link>http://coderscult.com/php/php-curl/2008/05/20/how-to-post-data-with-curl-in-php/</link>
		<comments>http://coderscult.com/php/php-curl/2008/05/20/how-to-post-data-with-curl-in-php/#comments</comments>
		<pubDate>Tue, 20 May 2008 12:10:26 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[PHP cURL]]></category>

		<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=40</guid>
		<description><![CDATA[Do you need to post data to a website using PHP?  It&#8217;s actually pretty easy to do.  Here&#8217;s the code.
&#60;?php
$urltopost = &#34;http://somewebsite.com/script.php&#34;;
$datatopost = array &#40;
&#34;firstname&#34; =&#62; &#34;Mike&#34;,
&#34;lastname&#34; =&#62; &#34;Lopez&#34;,
&#34;email&#34; =&#62; &#34;my@email.com&#34;,
&#41;;
&#60;span id=&#34;more-40&#34;&#62;&#60;/span&#62;
$ch = curl_init &#40;$urltopost&#41;;
curl_setopt &#40;$ch, CURLOPT_POST, true&#41;;
curl_setopt &#40;$ch, CURLOPT_POSTFIELDS, $datatopost&#41;;
curl_setopt &#40;$ch, CURLOPT_RETURNTRANSFER, true&#41;;
$returndata = curl_exec &#40;$ch&#41;;
?&#62;
And what happened?  Here&#8217;s my quick [...]]]></description>
			<content:encoded><![CDATA[<p>Do you need to post data to a website using PHP?  It&#8217;s actually pretty easy to do.  Here&#8217;s the code.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="re0">$urltopost</span> = <span class="st0">&quot;http://somewebsite.com/script.php&quot;</span>;<br />
<span class="re0">$datatopost</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a> <span class="br0">&#40;</span><br />
<span class="st0">&quot;firstname&quot;</span> =&gt; <span class="st0">&quot;Mike&quot;</span>,<br />
<span class="st0">&quot;lastname&quot;</span> =&gt; <span class="st0">&quot;Lopez&quot;</span>,<br />
<span class="st0">&quot;email&quot;</span> =&gt; <span class="st0">&quot;my@email.com&quot;</span>,<br />
<span class="br0">&#41;</span>;</p>
<p>&lt;span id=<span class="st0">&quot;more-40&quot;</span>&gt;&lt;/span&gt;</p>
<p><span class="re0">$ch</span> = curl_init <span class="br0">&#40;</span><span class="re0">$urltopost</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_POST, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_POSTFIELDS, <span class="re0">$datatopost</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="re0">$returndata</span> = curl_exec <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
<span class="kw2">?&gt;</span></div>
<p>And what happened?  Here&#8217;s my quick explanation.</p>
<p><strong>$urltopost</strong></p>
<blockquote><p>The url where you want to post your data to</p></blockquote>
<p><strong>$datatopost</strong></p>
<blockquote><p>The post data as an associative array.  The keys are the post variables</p></blockquote>
<p><strong>$ch = curl_init ($urltopost);</strong></p>
<blockquote><p>Initializes cURL</p></blockquote>
<p><strong>curl_setopt ($ch, CURLOPT_POST, true);</strong></p>
<blockquote><p>Tells cURL that we want to send post data</p></blockquote>
<p><strong>curl_setopt ($ch, CURLOPT_POSTFIELDS, $datatopost);</strong></p>
<blockquote><p>Tells cURL what are post data is</p></blockquote>
<p><strong>curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);</strong></p>
<blockquote><p>Tells cURL to return the output of the post</p></blockquote>
<p><strong>$returndata = curl_exec ($ch);</strong></p>
<blockquote><p>Executes the cURL and saves theoutput in $returndata</p></blockquote>
<p>There ya go!  If you have questions, <a href="http://forums.coderscult.com/index.php/topic,140.new.html">just ask in our forum</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/php/php-curl/2008/05/20/how-to-post-data-with-curl-in-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PHP cURL Tutorial and Example</title>
		<link>http://coderscult.com/php/php-curl/2008/05/20/php-curl-tutorial-and-example/</link>
		<comments>http://coderscult.com/php/php-curl/2008/05/20/php-curl-tutorial-and-example/#comments</comments>
		<pubDate>Tue, 20 May 2008 12:04:00 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[PHP cURL]]></category>

		<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://coderscult.com/?p=41</guid>
		<description><![CDATA[Do you want to learn how to use cURL in PHP?  Well, if so then this tutorial is for you.  But before anything else, what is cURL?
cURL is a command line tool for transferring files with URL syntax. The strong point of cURL is the number of data transfer protocols it supports. It [...]]]></description>
			<content:encoded><![CDATA[<p>Do you want to learn how to use cURL in PHP?  Well, if so then this tutorial is for you.  But before anything else, what is cURL?</p>
<blockquote><p>cURL is a command line tool for transferring files with URL syntax. The strong point of cURL is the number of data transfer protocols it supports. It is distributed under the MIT License which makes cURL free software.  It supports FTP, FTPS, HTTP, HTTPS, TFTP, SCP, SFTP, Telnet, DICT, FILE and LDAP. - <a href="http://en.wikipedia.org/wiki/CURL" target="_blank">based on Wikipedia&#8217;s definition</a></p></blockquote>
<p><span id="more-41"></span></p>
<p>PHP cURL allows you to read websites, make automated logins, upload files and many more.  I&#8217;m personally using it to automate updating of my many websites.</p>
<p>Now that you know what cURL is, I think it&#8217;s time to look at some code.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="re0">$ch</span> = curl_init <span class="br0">&#40;</span><span class="st0">&quot;http://www.yahoo.com&quot;</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
<span class="re0">$yahoo</span> = curl_exec <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
<span class="kw2">?&gt;</span></div>
<p>The simple example above simply gets the contents of <strong>www.yahoo.com</strong> and saves it in the variable <strong>$yahoo</strong>.  Here&#8217;s a line-by-line explanation:</p>
<p><strong>$ch = curl_init (&quot;http://www.yahoo.com&quot;);</strong></p>
<blockquote><p>Initialize curl with the URL of yahoo</p></blockquote>
<p><strong>curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);</strong></p>
<blockquote><p>Tell php curl that we want the data returned to us instead of being displayed</p></blockquote>
<p><strong>$yahoo = curl_exec ($ch);</strong></p>
<blockquote><p>Execute curl and put the output in $yahoo.</p></blockquote>
<p>But, that&#8217;s too simple!  That can be done in simpler ways with PHP&#8217;s file functions such as file() and file_get_contents()!  True but that&#8217;s where the comparison ends.</p>
<p>The power of PHP cURL lies within the curl_setopt() function.  This function instructs cURL of what exactly we want to do.  Let&#8217;s say, what if a webpage that you want to access checks for the HTTP_REFERER header?  Or perhaps, what if you need to access a webpage that works correctly only if cookies are enabled?</p>
<p>Here&#8217;s another example&#8230; This time we specify the HTTP_REFERER&#8230;</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">&lt;?php</span><br />
<span class="re0">$ch</span> = curl_init <span class="br0">&#40;</span><span class="st0">&quot;http://www.somedomain.com/page2.php&quot;</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="kw2">true</span><span class="br0">&#41;</span>;<br />
curl_setopt <span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_REFERER, <span class="st0">&quot;http://www.somedomain.com/page1.php&quot;</span><span class="br0">&#41;</span>;<br />
<span class="re0">$page</span> = curl_exec <span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
<span class="kw2">?&gt;</span></div>
<p>In this example, the CURLOPT_REFERER line tells cURL to set the HTTP_REFERER header to http://www.somedomain.com/page1.php.</p>
<p>PHP cURL can do more.  It can send POST data, it can log on to a website and automate tasks as if it was a real person and much more.  That&#8217;s it for now and I hope this PHP cURL Tutorial helped you.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/php/php-curl/2008/05/20/php-curl-tutorial-and-example/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to Correctly Render Transparent PNG images in Internet Explorer</title>
		<link>http://coderscult.com/javascript-ajax/2008/04/25/how-to-correctly-render-transparent-png-images-in-internet-explorer/</link>
		<comments>http://coderscult.com/javascript-ajax/2008/04/25/how-to-correctly-render-transparent-png-images-in-internet-explorer/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 18:12:51 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[Javascript/AJAX]]></category>

		<guid isPermaLink="false">http://coderscult.com/javascript-ajax/2008/04/25/how-to-correctly-render-transparent-png-images-in-internet-explorer/</guid>
		<description><![CDATA[PNG images are more often better than GIF when it comes to rendering images with transparency mainly because GIF can only support 256 colors while PNG can support 32-bit colors.  Here&#8217;s a graphical comparison between the two.


PNG is obviously better!  Problem is that Internet Explorer 6 and below doesn&#8217;t support PNG images natively [...]]]></description>
			<content:encoded><![CDATA[<p><acronym title="Portable Network Graphics">PNG</acronym> images are more often better than <acronym title="Graphics Interchange Format">GIF</acronym> when it comes to rendering images with transparency mainly because GIF can only support 256 colors while PNG can support 32-bit colors.  Here&#8217;s a graphical comparison between the two.</p>
<p><span id="more-34"></span></p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/04/gif-png-comparison.png' alt='Comparing Transparent GIF and PNG' /></p>
<p>PNG is obviously better!  Problem is that Internet Explorer 6 and below doesn&#8217;t support PNG images natively and that&#8217;s kind of bad for web designers who wish to make use of the power of the PNG image format.  Other browsers such as Firefox, Opera and Safari support PNG natively but not IE6 and below.  Why?  Well you go and ask Microsoft.</p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/04/png-ie-problem.png' alt='PNG problem in Internet Explorer 6 and below' /></p>
<p>Is there a solution?  Of course!  I won&#8217;t try to explain how it works because there are many websites out there explaining how it works.  I&#8217;ve pretty much based my code on a solution provided by Microsoft which uses the proprietary AlphaImageLoader filter.  The problem with their solution is that you have to practically edit all your web pages plus it won&#8217;t validate with CSS standards.</p>
<p>After studying the basics, I came up with a simple and valid solution that works.  With a little help from a 1&#215;1 transparent GIF and a few lines of javascript, you can properly render PNG images with alpha transparency in Internet Explorer.  Here&#8217;s what you do.</p>
<ol>
<li>Upload this <a href='http://coderscult.com/wp-content/uploads/2008/04/1.gif' title='Our Nifty 1×1 Transparent GIF'>Nifty 1×1 Transparent GIF</a> to your web server.  Put it in the same folder as your html file.</li>
<li>Upload this <a href='http://coderscult.com/wp-content/uploads/2008/04/iepng.js' title='Nifty Javascript that fixes PNGs in IE'>Nifty Javascript that fixes PNGs in IE</a> to your web server.  Put it in the same folder as your html file.</li>
<li>Paste the following javascript code somewhere inside the &lt;head&gt;&lt;/head&gt; section of your page.
<p><code style="font-size:.8em">&lt;!<span>-</span>-[if lte IE 6]&gt;<br />
&lt;script language=&quot;javascript&quot; src=&quot;iepng.js&quot;&gt;&lt;/script&gt;<br />
&lt;![endif]-<span>-</span>&gt;</code></p>
</li>
<li>Refresh the page and enjoy transparent PNGs in Internet Explorer</li>
</ol>
<p>There you go.  Hope this helped.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/javascript-ajax/2008/04/25/how-to-correctly-render-transparent-png-images-in-internet-explorer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I&#8217;m a Potentate of the Rose</title>
		<link>http://coderscult.com/blog/2008/04/18/im-a-potentate-of-the-rose/</link>
		<comments>http://coderscult.com/blog/2008/04/18/im-a-potentate-of-the-rose/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 21:41:12 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://coderscult.com/blog/2008/04/18/im-a-potentate-of-the-rose/</guid>
		<description><![CDATA[Oh yes!  I finally cracked the code after spending almost an hour trying to figure the logic of the puzzle and I officially became a Potentate of the Rose.  The game is called Petals Around the Rose and it&#8217;s quite a nasty game.  My friend Kiel introduced me to it and I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderscult.com/petals/rosebig.jpg" border="0" alt="Be a Potentate of the Rose by playing Petals of the Rose" align="left" style="margin:0 5px 5px 0; border: 1px solid #eee;" />Oh yes!  I finally cracked the code after spending almost an hour trying to figure the logic of the puzzle and I officially became a Potentate of the Rose.  The game is called <a href="http://coderscult.com/petals-around-the-rose/">Petals Around the Rose</a> and it&#8217;s quite a nasty game.  My friend Kiel introduced me to it and I was somehow perplexed at how he came up with the right answers until I finally &#8220;got it!&#8221;</p>
<p><span id="more-32"></span></p>
<p>Although many versions of this game can be found online, I still chose to wrote <a href="http://coderscult.com/petals-around-the-rose/">my own version of the game</a> so I can put it in this blog and let my dear readers solve it as well.  The rules are the same so no need to worry about that.  So without any further ado&#8230;</p>
<p><a href="http://coderscult.com/petals-around-the-rose/">Click to SOLVE Petals Around the Rose HERE &raquo;</a></p>
<p align="center"><a href="http://coderscult.com/petals-around-the-rose/"><img src='http://coderscult.com/wp-content/uploads/2008/04/petals-around-the-rose.jpg' alt='Become a Potentate of the Rose' /></a></p>
<p><a href="http://coderscult.com/blog/2008/04/18/im-a-potentate-of-the-rose/#comment">Share your experiences with the puzzle here &raquo;</a></p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/blog/2008/04/18/im-a-potentate-of-the-rose/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Setting up your PHP Development Environment</title>
		<link>http://coderscult.com/php/2008/03/26/setting-up-your-php-development-environment/</link>
		<comments>http://coderscult.com/php/2008/03/26/setting-up-your-php-development-environment/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 19:34:04 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[PHP Programming]]></category>

		<guid isPermaLink="false">http://coderscult.com/php/2008/03/26/setting-up-your-php-development-environment/</guid>
		<description><![CDATA[I realized that a lot of people who want to learn PHP are having hard time getting started with it - not because PHP is difficult to use or understand but simply because they don&#8217;t know where to start.  Because of this, I decided to write this short how-to on getting started with PHP. [...]]]></description>
			<content:encoded><![CDATA[<p>I realized that a lot of people who want to learn PHP are having hard time getting started with it - not because PHP is difficult to use or understand but simply because they don&#8217;t know where to start.  Because of this, I decided to write this short how-to on getting started with PHP.  It covers all the necessary stuff to setup Apache, PHP, and MySQL as well as to install one of my favorite PHP editors.</p>
<p><span id="more-22"></span></p>
<p>Without further ado, let&#8217;s go on&#8230;</p>
<p>The simplest way to install everything you need to run PHP web pages on your workstation is to install <a href="http://www.apachefriends.org/en/index.html">XAMPP</a>.  The beauty of using XAMPP is that it can be installed on any of the following operating systems:<br />
<img src='http://coderscult.com/wp-content/uploads/2008/03/xampplogo.jpg' alt='XAMPP Logo' align="right" hspace="5" />
<ul>
<li>Microsoft Windows</li>
<li>Linux</li>
<li>Sun Solaris</li>
<li>Mac OS X</li>
</ul>
<p>As for XAMPP, it means:</p>
<ul>
<li>X - any of the four operating systems above</li>
<li>A - Apache (the web server that serves your PHP web pages)</li>
<li>M - MySQL (the SQL database)</li>
<li>P - PHP</li>
<li>P - Perl</li>
</ul>
<p>It used to be called LAMPP where L stands for Linux but they decided to change L with X since it&#8217;s not just Linux anymore.  So how do we install it?  Simple, go to <a href="http://www.apachefriends.org/en/xampp.html">http://www.apachefriends.org/en/xampp.html</a> and download the correct installer for your system.  To make it even easier for you, I&#8217;m including the links to the installer download pages here.</p>
<ul>
<li>Linux - <a href="http://www.apachefriends.org/en/xampp-linux.html">http://www.apachefriends.org/en/xampp-linux.html</a></li>
<li>Microsoft Windows - <a href="http://www.apachefriends.org/en/xampp-windows.html">http://www.apachefriends.org/en/xampp-windows.html</a></li>
<li>Mac OS X - <a href="http://www.apachefriends.org/en/xampp-macosx.html">http://www.apachefriends.org/en/xampp-macosx.html</a></li>
<li>Sun Solaris - <a href="http://www.apachefriends.org/en/xampp-solaris.html">http://www.apachefriends.org/en/xampp-solaris.html</a></li>
</ul>
<p>To install, just download and follow installation instructions.  (C&#8217;mon, you don&#8217;t expect me to spoon-feed you everything right?)</p>
<p>After you&#8217;ve installed XAMPP, all you need to do is run it.  In Windows, all you have to do is run XAMPP Control and start each service that you want.  Basically, you&#8217;ll want to start Apache and MySQL.  After you&#8217;ve started Apache, you can now give it a try by browsing to http://localhost/.  That should show you the XAMPP welcome page.</p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/03/xamppcontrol.png' alt='XAMPP Control Panel' /><br />
The XAMPP Control Panel</p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/03/xamppstartup.png' alt='XAMPP Start Page' /><br />
XAMPP Start Page (http://localhost/)</p>
<p>XAMPP also comes with <a href="http://www.google.com.ph/url?sa=t&#038;ct=res&#038;cd=1&#038;url=http%3A%2F%2Fwww.phpmyadmin.net%2F&#038;ei=e57qR_-0KoSmpwSipb3xCQ&#038;usg=AFQjCNEVUIHBxbZboIeYNUd_4abvz6M1zw&#038;sig2=rwttWWCaOVTwJdySnUFucA">phpMyAdmin</a> which allows you to manage your MySQL databases via browser interface.  You may access phpMyAdmin by browsing to http://localhost/phpmyadmin</p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/03/phpmyadmin.png' alt='phpMyAdmin' /><br />
phpMyAdmin (http://localhost/phpmyadmin)</p>
<p>So where do you put your PHP pages so that they are properly served by Apache?  With XAMPP, it goes in the htdocs folder of your XAMPP installation.  I recommend that you create separate folders for your projects so you can easily manage them.</p>
<p>Now that you have Apache/PHP and MySQL running through XAMPP, the next thing for you to do is install an editor.  Any plain text editor such as Notepad will do.  However, there are better editors out there that provide syntax highlighting and debugging functions.  One of my favorites is <a href="http://www.eclipse.org/pdt/">Eclipse PDT (PHP Development Tools)</a>.  It runs on Java which means it is cross-platform.</p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/03/eclipse-splash.png' alt='Eclipse PDT Splash Screen' /><br />
Eclipse Splash Screen</p>
<p>The easiest way to install Eclipse PDT is to follow these simple steps:</p>
<ol>
<li>Go to <a href="http://download.eclipse.org/tools/pdt/downloads/">http://download.eclipse.org/tools/pdt/downloads/</a></li>
<li>Click the Release Build</li>
<li>Download the All-in-One package for your operating system</li>
<li>Uncompress the downloaded package and run Eclipse from there</li>
</ol>
<p>If you did it correctly, then you should see Eclipse&#8217;s IDE.  Mine looks something like this:</p>
<p align="center"><img src='http://coderscult.com/wp-content/uploads/2008/03/eclipse-ide.png' alt='Eclipse PDT Intergrated Development Environment' /><br />
Eclipse PDT Integrated Development Environment</p>
<p>One nice feature I like with Eclipse PDT is that it has a list of all the functions supported by PHP making it easier for me to write thousands of lines of code.  Also, since it&#8217;s an IDE, it also keeps track of your variables, functions, and classes.</p>
<p>Quick but important note, it&#8217;s also best to keep a copy of the PHP manual accessible.  If you&#8217;re always online, then the manual is just a click away.  Typing php.net/str_replace on your browser will take you to the documentation of the PHP&#8217;s str_replace function.  You may also want to <a href="http://docs.php.net/download-docs.php">download a copy of the PHP manual</a> if you&#8217;re not connected to the internet all the time.</p>
<p>There you go.  If you&#8217;ve successfully installed XAMPP and Eclipse then you already have the basic needs in getting started with PHP.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/php/2008/03/26/setting-up-your-php-development-environment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Translate Working Example</title>
		<link>http://coderscult.com/javascript-ajax/2008/03/22/google-translate-working-example/</link>
		<comments>http://coderscult.com/javascript-ajax/2008/03/22/google-translate-working-example/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 09:55:17 +0000</pubDate>
		<dc:creator>Mike Lopez</dc:creator>
		
		<category><![CDATA[Javascript/AJAX]]></category>

		<guid isPermaLink="false">http://coderscult.com/javascript-ajax/2008/03/22/google-translate-working-example/</guid>
		<description><![CDATA[As promised, here&#8217;s a sample implementation of the Google Translate API.
&#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34; ?&#62;
&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Transitional//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#34;&#62;
&#60;html xmlns=&#34;http://www.w3.org/1999/xhtml&#34;&#62;
&#60;head&#62;
&#60;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=UTF-8&#34; /&#62;
&#60;title&#62;Google Translate&#60;/title&#62;
&#60;script language=&#34;javascript&#34; src=&#34;http://www.google.com/jsapi&#34;&#62;&#60;/script&#62;
&#60;script language=&#34;javascript&#34;&#62;
&#160;google.load &#40;&#34;language&#34;, &#34;1&#34;&#41;;
&#160;function gtrans &#40;f&#41; &#123;
&#160; document.getElementById&#40;&#34;translation&#34;&#41;.innerHTML = &#34;-&#34;;
&#160; var lang = f.langpair.value.split&#40;&#34;&#124;&#34;&#41;;
&#160; google.language.translate &#40;f.translate.value, lang&#91;0&#93;, lang&#91;1&#93;, function &#40;result&#41; &#123;
&#160; &#160;if &#40;!result.error&#41; &#123;
&#160; &#160; var container [...]]]></description>
			<content:encoded><![CDATA[<p>As promised, here&#8217;s a sample implementation of the Google Translate API.</p>
<div class="dean_ch" style="white-space: wrap;">&lt;?xml version=<span class="st0">&quot;1.0&quot;</span> encoding=<span class="st0">&quot;UTF-8&quot;</span> <span class="kw2">?&gt;</span><br />
&lt;!DOCTYPE html <span class="kw2">PUBLIC</span> <span class="st0">&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</span> <span class="st0">&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;</span>&gt;<br />
&lt;html xmlns=<span class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=<span class="st0">&quot;Content-Type&quot;</span> content=<span class="st0">&quot;text/html; charset=UTF-8&quot;</span> /&gt;<br />
&lt;title&gt;Google Translate&lt;/title&gt;<br />
<span class="kw2">&lt;script language</span>=<span class="st0">&quot;javascript&quot;</span> src=<span class="st0">&quot;http://www.google.com/jsapi&quot;</span>&gt;&lt;/script&gt;<br />
<span class="kw2">&lt;script language</span>=<span class="st0">&quot;javascript&quot;</span>&gt;<br />
&nbsp;google.load <span class="br0">&#40;</span><span class="st0">&quot;language&quot;</span>, <span class="st0">&quot;1&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp;<span class="kw2">function</span> gtrans <span class="br0">&#40;</span>f<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; document.getElementById<span class="br0">&#40;</span><span class="st0">&quot;translation&quot;</span><span class="br0">&#41;</span>.innerHTML = <span class="st0">&quot;-&quot;</span>;<br />
&nbsp; <span class="kw2">var</span> lang = f.langpair.value.<a href="http://www.php.net/split"><span class="kw3">split</span></a><span class="br0">&#40;</span><span class="st0">&quot;|&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; google.language.translate <span class="br0">&#40;</span>f.translate.value, lang<span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>, lang<span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span>, <span class="kw2">function</span> <span class="br0">&#40;</span>result<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp;<span class="kw1">if</span> <span class="br0">&#40;</span>!result.error<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw2">var</span> container = document.getElementById<span class="br0">&#40;</span><span class="st0">&quot;translation&quot;</span><span class="br0">&#41;</span>.innerHTML = result.translation;<br />
&nbsp; &nbsp;<span class="br0">&#125;</span><br />
&nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">return</span> <span class="kw2">false</span>;<br />
&nbsp;<span class="br0">&#125;</span><br />
<span class="kw2">&lt;/script&gt;</span><br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form onsubmit=<span class="st0">&quot;return false&quot;</span>&gt;<br />
&nbsp;&lt;p&gt;Enter text to translate and click <span class="st0">&quot;Translate&quot;</span>&lt;/p&gt;<br />
&nbsp;&lt;textarea name=<span class="st0">&quot;translate&quot;</span> cols=<span class="st0">&quot;50&quot;</span> rows=<span class="st0">&quot;5&quot;</span>&gt;&lt;/textarea&gt;<br />
&nbsp;&lt;br /&gt;<br />
&nbsp;&lt;select name=<span class="st0">&quot;langpair&quot;</span>&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;ar|en&quot;</span>&gt;Arabic to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;zh|en&quot;</span>&gt;Chinese to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;zh-CN|zh-TW&quot;</span>&gt;Chinese <span class="br0">&#40;</span>Simplified to Traditional<span class="br0">&#41;</span>&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;zh-TW|zh-CN&quot;</span>&gt;Chinese <span class="br0">&#40;</span>Traditional to Simplified<span class="br0">&#41;</span>&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;nl|en&quot;</span>&gt;Dutch to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|ar&quot;</span>&gt;English to Arabic&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|zh-CN&quot;</span>&gt;English to Chinese <span class="br0">&#40;</span>Simplified<span class="br0">&#41;</span>&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|zh-TW&quot;</span>&gt;English to Chinese <span class="br0">&#40;</span>Traditional<span class="br0">&#41;</span>&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|nl&quot;</span>&gt;English to Dutch&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|fr&quot;</span>&gt;English to French&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|de&quot;</span>&gt;English to German&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|el&quot;</span>&gt;English to Greek&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|it&quot;</span>&gt;English to Italian&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|ja&quot;</span>&gt;English to Japanese&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|ko&quot;</span>&gt;English to Korean&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|pt&quot;</span>&gt;English to Portuguese&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|ru&quot;</span>&gt;English to Russian&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;en|es&quot;</span>&gt;English to Spanish&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;fr|en&quot;</span>&gt;French to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;fr|de&quot;</span>&gt;French to German&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;de|en&quot;</span>&gt;German to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;de|fr&quot;</span>&gt;German to French&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;el|en&quot;</span>&gt;Greek to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;it|en&quot;</span>&gt;Italian to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;ja|en&quot;</span>&gt;Japanese to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;ko|en&quot;</span>&gt;Korean to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;pt|en&quot;</span>&gt;Portuguese to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;ru|en&quot;</span>&gt;Russian to English&lt;/option&gt;<br />
&nbsp; &lt;option value=<span class="st0">&quot;es|en&quot;</span>&gt;Spanish to English&lt;/option&gt;<br />
&nbsp;&lt;/select&gt;<br />
&nbsp;&lt;input type=<span class="st0">&quot;button&quot;</span> value=<span class="st0">&quot;Translate&quot;</span> onclick=<span class="st0">&quot;gtrans(this.form)&quot;</span> /&gt;<br />
&nbsp;&lt;p id=<span class="st0">&quot;translation&quot;</span> style=<span class="st0">&quot;border:1px solid #00f;padding:5px;width:400px&quot;</span>&gt;-&lt;/p&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</div>
<p><span id="more-19"></span></p>
<p>Here&#8217;s the working sample:</p>
<p><iframe src="http://coderscult.com/wp-content/uploads/2008/03/index.html" width="450" height="400"><a href='http://coderscult.com/wp-content/uploads/2008/03/index.html' title='Google Translate Sample Implementation'>Google Translate Sample Implementation</a></iframe></p>
<p>With this API, translating a website from one language to another will be pretty straightforward and FREE.  Thanks to Google for providing us with this API, now we can finally increase usability in our websites.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderscult.com/javascript-ajax/2008/03/22/google-translate-working-example/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
