<?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>Design strike &#187; tutorial</title>
	<atom:link href="http://designstrike.net/tag/tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://designstrike.net</link>
	<description>Striking with the latest design info</description>
	<lastBuildDate>Fri, 18 Jun 2010 13:51:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to make your very own CAPTCHA</title>
		<link>http://designstrike.net/development/how-to-make-your-very-own-captcha.html</link>
		<comments>http://designstrike.net/development/how-to-make-your-very-own-captcha.html#comments</comments>
		<pubDate>Thu, 24 Sep 2009 20:32:41 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designstrike.net/?p=1141</guid>
		<description><![CDATA[CAPTCHA &#8211; a familiar term to some of us but also a weird word for others, nonetheless CAPTCHA is one of those thing everybody comes in contact somehow. Like the name tells it CAPTCHA is a acronym for Completely Automated Public Turing test to tell Computers and Humans Apart. Basically it`s whole purpose is to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignstrike.net%2Fdevelopment%2Fhow-to-make-your-very-own-captcha.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignstrike.net%2Fdevelopment%2Fhow-to-make-your-very-own-captcha.html&amp;source=designstrike&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>CAPTCHA &#8211; a familiar term to some of us but also a weird word for others, nonetheless CAPTCHA is one of those thing everybody comes in contact somehow. Like the name tells it CAPTCHA is a acronym for Completely Automated Public Turing test to tell Computers and Humans Apart. Basically it`s whole purpose is to tell if you are a human or a bot.</p>
<p><img src="http://designstrike.net/wp-content/uploads/2009/09/captcha-thumb.jpg" alt="captcha-thumb" title="captcha-thumb" width="492" height="324" class="alignnone size-full wp-image-1152" /></p>
<p>The system is a security feature first implemented by Yahoo, and soon spreaded on a big number of systems to improve security. The CAPTCHA is a representative image containing squiggly words that asks the user to type the word inside a form. A thing that a machine cannot possibly do.<br />
<span id="more-1141"></span><br />
<strong>How can CAPTCHA protect you?</strong><br />
There is a number of ways that it can protect you. Here are some of the places that users tend to come across squiggly images:</p>
<ul>
<li>Protecting a web registration form from automated registrations</li>
<li>Preventing automatic posting of advertising comments by robots on blogs or other similar applications.</li>
<li>Protection of voting systems from robots that try to fraud the results.</li>
<li>Preventing spam on contact forms.</li>
</ul>
<p>At the moment, there are a vast variety of free or commercial solutions to a CAPTCHA system, but the down side is that because of the variety of the forms, the easier is for the bots to adapt. Sometimes the images are to similar, the letters are to understandable and the list can go on. We will make a simple system, that makes robot adaptation as hard as possible, so your system is protected at all times.</p>
<p><strong>Server requirements</strong> </p>
<ul>
<li>PHP 4.1.0 or recent (PHP 5.x.x for blur)</li>
<li>FreeType library</li>
<li>GD 2.0.1 or recent</li>
</ul>
<p>In the config file, we will define the paths to the image and font used by the CAPTCHA system, you can specify your own images and font. Note: all of the fonts used in this tutorial are free fonts.</p>
<p><a href='http://designstrike.net/wp-content/uploads/2009/09/fonts.zip'>Fonts used in this tutorial</a><br />
<a href='http://designstrike.net/wp-content/uploads/2009/09/images.zip'>Images used in this tutorial</a></p>
<h2>Let`s build the form</h2>
<p><strong>First step, creating the config file</strong></p>
<p>We will create a config file (config.php) in which we will define the parameters of the code. The generated code must be available to the script that renders the user`s input of the form.</p>
<p>You can use a variety of systems like temp files, sessions or databases. In this tutorial we will use sessions, because they are the easiest to implement.</p>
<p>Thus we will first define the variable name in witch we will keep the code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$sessionVar</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'myCaptcha'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next step is to define the allowed characters</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$allowedChars</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789'</span><span style="color: #339933;">;</span></pre></div></div>

<p>Note that we skiped the number 0 (zero) to avoid confusion between zero and the letter &#8220;O&#8221; (capital o).</p>
<p>Now, we will make the lenght random, thus creating a more secure form.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$minCodeLength</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$maxCodeLength</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">;</span></pre></div></div>

<p>We know that a same letter size captcha is cracked more easily, so in the next markup we will randomize the letter height. The size will be measured in pixels.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$minFontSize</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">24</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$maxFontSize</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">32</span><span style="color: #339933;">;</span></pre></div></div>

<p>Another thing that influences CAPTCHA recognition for robots is the linear placement of the letters, so we will move them around the middle line.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$maxVerticalDisplacement</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">15</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, we will rotate the letters a bit.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$maxRotationLeft</span>  <span style="color: #339933;">=</span> <span style="color: #cc66cc;">15</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$maxRotationRight</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">15</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, we will be adjusting the padding of the letters</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$textPadding</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span></pre></div></div>

<p>Ok, now we will change the colours of the background</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$bgColor</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">255</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next, we will define an array on the allowed color hex tags for the letters</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$textColor</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>    
        <span style="color: #0000ff;">'200, 0, 0'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'30, 200, 0'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'150, 0, 200'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'150, 150, 0'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'100, 100, 100'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'ff0099'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'99ff00'</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Different fonts for each letter? Never been so easy. Here is how you can do it. Keep in mind that you need the FreeType library fr the GD to work. You can find free fonts on the <a href="http://www.dafont.com/" rel='nofollow'>DaFont website</a>.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$fontsFolder</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'my_fonts/'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fontFiles</span>   <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>  
        <span style="color: #0000ff;">'elektra.ttf'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'episode1.ttf'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'lcd2bold.ttf'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'optimusprinceps.ttf'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'sams_town.ttf'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'steinerlight.ttf'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'turn_table.ttf'</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now let`s set up the background images</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$backgroundsFolder</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'my_backgrounds/'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$backgrounds</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
        <span style="color: #0000ff;">'bg_1.png'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'bg_2.png'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'bg_3.png'</span><span style="color: #339933;">,</span>
        <span style="color: #0000ff;">'bg_4.png'</span>
        <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Don&#8217;t forget to replace the paths and names of the fonts and images with your own.</strong></p>
<p>Enough with the config, lets create something. Create a new php file, let`s say <em>show_code.php</em> that we will call like an ordinary image call.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;show_code.php&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;myCaptcha&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<p>Next, include the starting command and the config file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">session_start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'config.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$sessionVar</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next, we will need a function that will return the occupied space of a letter:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> getCharSize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$fontFile</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #339933;">,</span> <span style="color: #000088;">$angle</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">is_file</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fontFile</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$size</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$corners</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">imagettfbbox</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$size</span><span style="color: #339933;">,</span> <span style="color: #000088;">$angle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$fontFile</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$left</span>    <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">6</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$right</span>   <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$top</span>     <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">7</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">7</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$bottom</span>  <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span><span style="color: #000088;">$corners</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$width</span>   <span style="color: #339933;">=</span> <span style="color: #000088;">$right</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$left</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$height</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">abs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$top</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$bottom</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$return</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
                                <span style="color: #0000ff;">'width'</span>  <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span>
                                <span style="color: #0000ff;">'height'</span> <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$height</span><span style="color: #339933;">,</span>
                                <span style="color: #0000ff;">'bottom'</span> <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$bottom</span><span style="color: #339933;">,</span>
                                <span style="color: #0000ff;">'right'</span>  <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$right</span><span style="color: #339933;">,</span>
                                <span style="color: #0000ff;">'top'</span>    <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$top</span><span style="color: #339933;">,</span>
                                <span style="color: #0000ff;">'left'</span>   <span style="color: #339933;">=&gt;</span><span style="color: #000088;">$left</span>
                                <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$return</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$return</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Next we will need a functions that will return values in a single form, regardless of the hexadecimal colors of the letters:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> hex2decColor<span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr_count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">','</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$red</span><span style="color: #339933;">,</span> <span style="color: #000088;">$green</span><span style="color: #339933;">,</span> <span style="color: #000088;">$blue</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_map</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'trim'</span><span style="color: #339933;">,</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span> <span style="color: #000088;">$color</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$red</span>   <span style="color: #339933;">=</span> <span style="color: #990000;">hexdec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$green</span> <span style="color: #339933;">=</span> <span style="color: #990000;">hexdec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$blue</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">hexdec</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$color</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'red'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$red</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'green'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$green</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'blue'</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$blue</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now we will set the image size to 0 and generate code lenght based on the configured maximum and minimum lenght.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$imgWidth</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$imgHeight</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$codeLength</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$minCodeLength</span><span style="color: #339933;">,</span> <span style="color: #000088;">$maxCodeLength</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next, we will generate $codeLength times a character and it`s properties.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$c</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$codeLength</span><span style="color: #339933;">;</span> <span style="color: #000088;">$c</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'char'</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">=</span> <span style="color: #000088;">$allowedChars</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$allowedChars</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'color'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> hex2decColor<span style="color: #009900;">&#40;</span><span style="color: #000088;">$textColor</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$textColor</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'displacement'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$maxVerticalDisplacement</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$maxVerticalDisplacement</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'font'</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">=</span> <span style="color: #000088;">$fontsFolder</span><span style="color: #339933;">.</span><span style="color: #000088;">$fontFiles</span><span style="color: #009900;">&#91;</span><span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fontFiles</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span>   <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$minFontSize</span><span style="color: #339933;">,</span> <span style="color: #000088;">$maxFontSize</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'angle'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$maxRotationLeft</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$maxRotationRight</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$maxRotationRight</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'space'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$minLetterSpacing</span><span style="color: #339933;">,</span> <span style="color: #000088;">$maxLetterSpacing</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We find out the dimensions of the current character, using one of the functions defined earlier.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$properties</span> <span style="color: #339933;">=</span> getCharSize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'font'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'char'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'angle'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$width</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$properties</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'width'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$height</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$properties</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'height'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>After we found the width of the character, we add it to the image total width along with the distance to the next character.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$imgWidth</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$width</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$codeLength</span><span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$imgWidth</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'space'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>If the image height is smaller than the current character height, then we set it the correct height.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$height</span> <span style="color: #339933;">+</span> <span style="color: #990000;">abs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'displacement'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #000088;">$imgHeight</span> <span style="color: #009900;">&#41;</span>
                <span style="color: #000088;">$imgHeight</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$height</span> <span style="color: #339933;">+</span> <span style="color: #990000;">abs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'displacement'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We add the current character to the row that forms our code</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$sessionVar</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'char'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Next we add the padding</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$imgWidth</span>  <span style="color: #339933;">+=</span> <span style="color: #000088;">$textPadding</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$imgHeight</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$textPadding</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">2</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$maxVerticalDisplacement</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now, that we set the dimensions, let&#8217;s create the image and calculate the background image position. The images can be different textures or landscapes on a higher resolution than our image, so we will need only a portion defined randomly:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$img</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecreatetruecolor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$imgWidth</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imgHeight</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We choose a random image and read the dimensions:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$bg</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$backgrounds</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bgWidth</span><span style="color: #339933;">,</span> <span style="color: #000088;">$bgHeight</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$backgroundsFolder</span><span style="color: #339933;">.</span><span style="color: #000088;">$backgrounds</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$bg</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We set position where the portion of the image begins to be used as background and copy it in our image:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$bgX</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$bgWidth</span><span style="color: #339933;">-</span><span style="color: #000088;">$imgWidth</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$bgY</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$bgHeight</span><span style="color: #339933;">-</span><span style="color: #000088;">$imgHeight</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$bgImg</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecreatefrompng</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$backgroundsFolder</span><span style="color: #339933;">.</span><span style="color: #000088;">$backgrounds</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$bg</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">imagecopy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span> <span style="color: #000088;">$bgImg</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$bgX</span><span style="color: #339933;">,</span> <span style="color: #000088;">$bgY</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imgWidth</span><span style="color: #339933;">,</span> <span style="color: #000088;">$imgHeight</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">imagedestroy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$bgImg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next is the code markup inside the image</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$cursor</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$textPadding</span><span style="color: #339933;">;</span></pre></div></div>

<p>We set the previously generated color for the current character:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #000088;">$c</span> <span style="color: #339933;">&lt;=</span> <span style="color: #000088;">$codeLength</span><span style="color: #339933;">;</span> <span style="color: #000088;">$c</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$color</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecolorallocate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'color'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'red'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'color'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'green'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'color'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'blue'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>We calculate the vertical character, depending on its size and the amount of displacement from the center generated for him:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000088;">$properties</span> <span style="color: #339933;">=</span> getCharSize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'font'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'char'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'angle'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$width</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$properties</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'width'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$height</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$properties</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'height'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$bottom</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$properties</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'bottom'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000088;">$y</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'displacement'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$maxVerticalDisplacement</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$height</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$bottom</span><span style="color: #339933;">;</span></pre></div></div>

<p>We write the current character and move the cursor to the right:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">imagettftext</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'size'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'angle'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cursor</span><span style="color: #339933;">,</span> <span style="color: #000088;">$y</span><span style="color: #339933;">,</span> <span style="color: #000088;">$color</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'font'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'char'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$cursor</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'space'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>We have left but to apply the Gaussian Blur filter, if the system allows:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'imagefilter'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #990000;">imagefilter</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #339933;">,</span> IMG_FILTER_GAUSSIAN_BLUR<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>At this point, our image is ready and we have to only serve it to a browser, and specify that the image should not be cached by the headers and the format is PNG (can be as good GIF, JPEG or any other format supported by the GD library), then release the resources on the server:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Cache-Control: no-store, no-cache, must-revalidate'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Cache-Control: post-check=0, pre-check=0'</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">false</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Pragma: no-cache'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Content-type: image/png'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">imagepng</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">imagedestroy</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$img</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Verify! Inside the file that the POST data is sent, we need to open the session using session_start(); and verify that our input data is exactly the same with the saved data. This goes something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_METHOD'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'POST'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'myCaptcha'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'myCaptcha'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">// The rest of the data is being processed</span>
        <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">// Wrong Code! Try Again or Go Away!</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>God, I`m finished</h2>
<p><strong>Tips&#038;Triks</strong><br />
To give visitors the opportunity to generate another code without needing to reload the entire page, display the image using the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>img src<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;show_code.php&quot;</span> alt<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;myCaptcha&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;javascript:this.src += '?';&quot;</span> <span style="color: #339933;">/&gt;</span></pre></div></div>

<p>And this is how to create a simple captcha using PHP inside your system. </p>
]]></content:encoded>
			<wfw:commentRss>http://designstrike.net/development/how-to-make-your-very-own-captcha.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Basic things you need to make a wordpress template</title>
		<link>http://designstrike.net/wordpress/basic-things-you-need-to-make-a-wordpress-template.html</link>
		<comments>http://designstrike.net/wordpress/basic-things-you-need-to-make-a-wordpress-template.html#comments</comments>
		<pubDate>Fri, 17 Jul 2009 08:45:37 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[gimp]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[xammp]]></category>

		<guid isPermaLink="false">http://designstrike.net/?p=337</guid>
		<description><![CDATA[url_site = 'http://designstrike.net/wordpress/basic-things-you-need-to-make-a-wordpress-template.html';When you are trying or actively developing a wordpress template, you need to have a few things in mind and installed on your computer. Let me start with the basic things you need to make a wordpress template: 1. First off you need Adobe Photoshop, I wont go further in this subject, and [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignstrike.net%2Fwordpress%2Fbasic-things-you-need-to-make-a-wordpress-template.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignstrike.net%2Fwordpress%2Fbasic-things-you-need-to-make-a-wordpress-template.html&amp;source=designstrike&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><div style="margin-left: 10px; margin-top: 5px; float:left;"><script type="text/javascript">url_site = 'http://designstrike.net/wordpress/basic-things-you-need-to-make-a-wordpress-template.html';</script><script type="text/javascript" src="http://wpscoop.com/sites/all/modules/drigg_external/js/button.js"></script></div>When you are trying or <strong>actively developing a wordpress template</strong>, you need to have a few things in mind and installed on your computer. Let me start with the <strong>basic things you need to make a wordpress template</strong>:</p>
<p><a href="http://designstrike.net/wp-content/uploads/2009/07/wordpress-theme-develoment.jpg" rel='nofollow'><img src="http://designstrike.net/wp-content/uploads/2009/07/wordpress-theme-develoment.jpg" alt="wordpress-theme-develoment" title="wordpress-theme-develoment" width="550" height="208" class="alignnone size-full wp-image-338" /></a><br />
<span id="more-337"></span><br />
1. First off you need Adobe Photoshop, I wont go further in this subject, and if you cant get it there is always a free version called <a href="http://www.gimp.org/downloads/" rel='nofollow'>GIMP</a>.<br />
2. The next step is to get a test server on wich you can test your WordPress template on the process of making, trust me you wil make a lot of refreshes. I often use <a href="http://www.apachefriends.org/en/xampp-windows.html" rel='nofollow'>xammp</a>, its free and usefull.<br />
3. <a href="http://www.mozilla.com/en-US/firefox/upgrade.html?from=getfirefox" rel='nofollow'>Firefox</a> is a must in every man woman and child who surfs the net, so use it often on your wordpress projects.<br />
4.You will need an <strong>empty wordpress template</strong>, or a <strong>stripped to the bone wordpress template</strong> where only the semantic code is present, but the style is up to you. I use in all my wordpress template development projects the <a href="http://elliotjaystocks.com/blog/archive/2008/free-starkers-wordpress-theme/" rel='nofollow'><strong>Starkers wordpress template</strong></a> by Elliot.<br />
5.If you are a beginner, then you need some advice, and a previous post of mine will help you <a href="http://designstrike.net/wordpress/wordpress-mockup-tutorials-the-best.html" rel='nofollow'>make a wordpress template</a>.<br />
6.Sometimes I need stock and vector images and the best place to get them is <a href="http://www.bazaardesigns.com" rel='nofollow'>bazaardesigns.com</a><br />
7.Now you need to make your wordpress template accesible, like getting a <a href="http://designstrike.net/wordpress/theme-options-for-a-wordpress-template.html" rel='nofollow'>wordpress theme options page</a><br />
8.Last thing you need to do is get your template into the <a href="http://wordpress.org/extend/themes/" rel='nofollow'>wordpress template directory</a> with you link in the footer, and with a few hundred downloads a day, well you do the math and BANG! instant SEO <img src='http://designstrike.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://designstrike.net/wordpress/basic-things-you-need-to-make-a-wordpress-template.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Theme options for a WordPress Template</title>
		<link>http://designstrike.net/wordpress/theme-options-for-a-wordpress-template.html</link>
		<comments>http://designstrike.net/wordpress/theme-options-for-a-wordpress-template.html#comments</comments>
		<pubDate>Sat, 11 Jul 2009 09:24:55 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[theme options]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designstrike.net/?p=316</guid>
		<description><![CDATA[url_site = 'http://designstrike.net/wordpress/theme-options-for-a-wordpress-template.html';Today we will list some of the most usefull tutorials for creating a theme options page for a wordpress template. Having a options page in your wordpress template is a must for every designer who wants maximum exposure from their template, it connect great design with great functionality and easy customization. The wordpress [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignstrike.net%2Fwordpress%2Ftheme-options-for-a-wordpress-template.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignstrike.net%2Fwordpress%2Ftheme-options-for-a-wordpress-template.html&amp;source=designstrike&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<div id="attachment_333" class="wp-caption alignnone" style="width: 560px"><a href="http://designstrike.net/wp-content/uploads/2009/07/Header-img.jpg" rel='nofollow'><img src="http://designstrike.net/wp-content/uploads/2009/07/Header-img.jpg" alt="Theme options page for a wordpress template" title="Header-img" width="550" height="208" class="size-full wp-image-333" /></a><p class="wp-caption-text">Theme options page for a wordpress template</p></div>
<p><div style="margin-left: 10px; margin-top: 5px; float:left;"><script type="text/javascript">url_site = 'http://designstrike.net/wordpress/theme-options-for-a-wordpress-template.html';</script><script type="text/javascript" src="http://wpscoop.com/sites/all/modules/drigg_external/js/button.js"></script></div>Today we will list some of the most usefull tutorials for creating a theme <strong>options page for a wordpress template</strong>. Having a options page in your wordpress template is a must for every designer who wants maximum exposure from their template, it connect great design with great functionality and easy customization. The wordpress theme option secret is one of the most guarded things in wordpress template development, so here are the few <strong>options page tutorials</strong> in how to set them up in a wordpress template.<br />
<span id="more-316"></span></p>
<h2>In the woods &#8211; Creating a wordpress template options page</h2>
<p><a href="http://blog.themeforest.net/wordpress/create-an-options-page-for-your-wordpress-theme/" rel='nofollow'><img class="size-full wp-image-317" title="In-the-woods" src="http://designstrike.net/wp-content/uploads/2009/07/In-the-woods.jpg" alt="WordPress theme options page" width="550" height="208" /></a></p>
<blockquote><p>In this article we will be incorporating an options panel for the ‘WordPress Classic’ theme. The methods you learn will allow you to very easily integrate it into an existing theme you’re working on.</p></blockquote>
<h2>For the Lose: How To: Create a Theme Options Page</h2>
<p><a href="http://forthelose.org/how-to-create-a-theme-options-page-for-your-wordpress-theme" rel='nofollow'><img class="alignnone size-full wp-image-325" title="for-the-lose-theme-options" src="http://designstrike.net/wp-content/uploads/2009/07/for-the-lose-theme-options.jpg" alt="for-the-lose-theme-options" width="550" height="208" /></a></p>
<blockquote><p>Theme Options pages are growing in popularity among quality WordPress themes. They provide the user with greater customization control over their website without having to know a hint of HTML or CSS.</p></blockquote>
<h2>Create An Awesome WordPress Theme Options Page by nometech.com</h2>
<p><a href="http://www.nometech.com/blog/create-an-awesome-wordpress-theme-options-page-part-1/" rel='nofollow'><img class="alignnone size-full wp-image-328" title="3-series-tutorial" src="http://designstrike.net/wp-content/uploads/2009/07/3-series-tutorial.jpg" alt="3-series-tutorial" width="550" height="208" /></a></p>
<p>A 3 series tutorial involving all the necesary steps in creating an awesome <strong>theme options page for wordpress</strong>.</p>
<ul>
<li>Create An Awesome WordPress Theme Options Page (part 1)</li>
<li><a title="Create An Awesome WordPress Theme Options Page (part 2 - implementation)" href="http://www.nometech.com/blog/create-an-awesome-wordpress-theme-options-page-part-2-implementation/" rel='nofollow'>Create An Awesome WordPress Theme Options Page (part 2 &#8211; implementation)</a></li>
<li><a title="Create An Awesome WordPress Theme Options Page (part 3)" href="http://www.nometech.com/blog/create-an-awesome-wordpress-theme-options-page-part-3/" rel='nofollow'>Create An Awesome WordPress Theme Options Page (part 3)</a></li>
</ul>
<blockquote><p>These days with so many WordPress themes being released, you need something to make your theme stand out from the crowd. One of the ways you can do this is by creating an awesome theme options page.</p></blockquote>
<p>If you know any other great theme <strong>options page tutorials for wordpress</strong> please give me an info and I will post them here. Also follow us on twitter or subscribe via RSS.</p>
]]></content:encoded>
			<wfw:commentRss>http://designstrike.net/wordpress/theme-options-for-a-wordpress-template.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress mockup tutorials the best</title>
		<link>http://designstrike.net/wordpress/wordpress-mockup-tutorials-the-best.html</link>
		<comments>http://designstrike.net/wordpress/wordpress-mockup-tutorials-the-best.html#comments</comments>
		<pubDate>Sun, 21 Jun 2009 20:58:22 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[mockup]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://designstrike.net/?p=241</guid>
		<description><![CDATA[url_site = 'http://designstrike.net/wordpress/wordpress-mockup-tutorials-the-best.html';This is a fancy list of some wordpress template tutorials that helped me in the past few years on my wordpress learning saga. Feel free and read all of them, you will learn the basics and advanced wordpress mockup and coding skills. Professionaly written, sometimes video edited, the wordpress mockup tutorials often include [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fdesignstrike.net%2Fwordpress%2Fwordpress-mockup-tutorials-the-best.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fdesignstrike.net%2Fwordpress%2Fwordpress-mockup-tutorials-the-best.html&amp;source=designstrike&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignnone size-full wp-image-255" title="wordpress-theme-guide-head" src="http://designstrike.net/wp-content/uploads/2009/06/wordpress-theme-guide-head.png" alt="wordpress-theme-guide-head" width="550" height="208" /></p>
<p><!--digg--><div style="margin-left: 10px; margin-top: 5px; float:left;"><script type="text/javascript">url_site = 'http://designstrike.net/wordpress/wordpress-mockup-tutorials-the-best.html';</script><script type="text/javascript" src="http://wpscoop.com/sites/all/modules/drigg_external/js/button.js"></script></div>This is a fancy list of some <strong>wordpress template tutorials</strong> that helped me in the past few years on my wordpress learning saga. Feel free and read all of them, you will learn the basics and <strong>advanced wordpress mockup and coding </strong>skills. Professionaly written, sometimes video edited, the <strong>wordpress mockup tutorials </strong>often include both <strong>Photoshop mockup tutorial</strong> and the <strong>coding tutorial for a wordpress template</strong>.</p>
<p><span id="more-241"></span></p>
<p>Let`s get started then&#8230;</p>
<h2>Bloopress wordpress mockup by HV-Designs.co.uk</h2>
<p><a href="http://hv-designs.co.uk/2009/04/16/bloopress-wordpress-mockup/" rel='nofollow'><img class="alignnone size-full wp-image-242" title="bloopress-hvdesigns" src="http://designstrike.net/wp-content/uploads/2009/06/bloopress-hvdesigns.png" alt="bloopress-hvdesigns" width="550" height="208" /></a></p>
<p><strong>These are the parts you need to read:</strong></p>
<ul><strong><a href="http://hv-designs.co.uk/2009/04/16/bloopress-wordpress-mockup/" rel='nofollow'> </a></strong></p>
<li><strong><a href="http://hv-designs.co.uk/2009/04/16/bloopress-wordpress-mockup/" target="_blank" rel='nofollow'>WordPress Photoshop Mockup</a></strong></li>
<li><strong><a href="http://hv-designs.co.uk/2009/04/21/bloopress-css-template/" target="_blank" rel='nofollow'>WordPress Photoshop to CSS coding</a></strong></li>
<li><strong><a href="http://hv-designs.co.uk/2009/04/24/bloopress-wordpress-theme/" target="_blank" rel='nofollow'>WordPress template coding</a></strong></li>
</ul>
<p>Very well documented and written. You will learn the basics of creating a <strong>wordpress template</strong> in no time. While your at it, be shure to check out the <a href="http://hv-designs.co.uk/hv_shop" target="_blank" rel='nofollow'>HV shop</a>, you could get some nice things there.</p>
<h2>Scratch learning from wpdesigner.com</h2>
<p><a href="http://www.wpdesigner.com/2007/02/19/so-you-want-to-create-wordpress-themes-huh/" target="_blank" rel='nofollow'><img class="alignnone size-full wp-image-247" title="wpdesigner-scratch-wordpress" src="http://designstrike.net/wp-content/uploads/2009/06/wpdesigner-cratch-wordpress.png" alt="wpdesigner-scratch-wordpress" width="550" height="208" /></a></p>
<p>In this series you will learn hot to build a <strong>wordpress website from scratch</strong>, fom installing Xammp on local to template creation, be shure to check them out. It has a complete 16 part tutorial on absolute every aspect of creating a <strong>fully functional wordpress template</strong>.</p>
<h2>The 5 minute wordpress template</h2>
<p><a href="http://levoltz.com/2006/09/17/how-to-create-a-wordpress-template-in-5-minutes/" rel='nofollow'><img class="alignnone size-full wp-image-248" title="the-5-minute-theme" src="http://designstrike.net/wp-content/uploads/2009/06/the-5-minute-theme.png" alt="the-5-minute-theme" width="550" height="208" /></a></p>
<p>This tutorial is the best for <strong>boosting wordpress templates</strong>, 5 minutes tops. I know its a bit old but, I got a few clients satisfied following this tutorial. Be shure to check it out.</p>
<h2>Premium wordpress mockup tutorial from designreviver.com</h2>
<p><a href="http://designreviver.com/tutorials/premium-wordpress-theme-design-part-1-the-photoshop-mock-up/" rel='nofollow'><img class="alignnone size-full wp-image-251" title="designreviver-wordpress-template-mockup" src="http://designstrike.net/wp-content/uploads/2009/06/designreviver-wordpress-template-mockup.png" alt="designreviver-wordpress-template-mockup" width="550" height="208" /></a></p>
<p><strong>The parts:</strong></p>
<ul>
<li><a href="http://designreviver.com/tutorials/premium-wordpress-theme-design-part-1-the-photoshop-mock-up/" target="_blank" rel='nofollow'><strong>Photoshop premium wordpress mockup tutorial</strong></a></li>
<li><a href="http://designreviver.com/tutorials/premium-wordpress-theme-design-part-2-html-css-wordpress-theme-files/" target="_blank" rel='nofollow'><strong>Coding wordpress tutorial</strong></a></li>
</ul>
<p>Well detailed,professionally looking and <strong>fast wordpress template tutorial</strong>. This a complex tutorial, illustrating almost everything you can add to a wordpress template. Be shure to check it out more than once.</p>
<h2>WordPress theme guide by urbangiraffe.com</h2>
<p><a href="http://urbangiraffe.com/themes/guides/" target="_blank" rel='nofollow'><img class="alignnone size-full wp-image-253" title="wordpress-theme-guide" src="http://designstrike.net/wp-content/uploads/2009/06/wordpress-theme-guide.png" alt="wordpress-theme-guide" width="550" height="208" /></a></p>
<p>The parts:</p>
<ul>
<li><a href="http://urbangiraffe.com/2005/04/12/themeguide1/" rel='nofollow'>Part one</a> &#8211; Pulling it apart</li>
<li><a href="http://urbangiraffe.com/2005/04/22/themeguide2/" rel='nofollow'>Part two</a> &#8211; Complete design, header, and footer</li>
<li><a href="http://urbangiraffe.com/2005/04/30/themeguide3/" rel='nofollow'>Part three</a> &#8211; The sidebar</li>
<li><a href="http://urbangiraffe.com/2005/05/20/themeguide4/" rel='nofollow'>Part four</a> &#8211; The content</li>
</ul>
<p>Well wirtten 4 part series in<strong> wordpress template creation</strong>. This coveres the basics like pulling it apart to the more advance sections like the content and the sidebar. Very nice documented <strong>wordpress theme guide</strong>.</p>
<p>A fully revised and complete PDF edition is <a href="http://www.lulu.com/content/129745" rel='nofollow'>now available</a>. This has been extensively edited and has additional information on three-column layouts, as well as several fixes.</p>
<h2>How to Create a Clean Blog Design with Photoshop by Six Revisions</h2>
<p><a href="http://sixrevisions.com/tutorials/photoshop-tutorials/how-to-create-a-clean-blog-design-with-photoshop/" target="_blank" rel='nofollow'><img src="http://images.sixrevisions.com/2009/08/19-01_clean_blog_design_leading_img.jpg" /></a><br />
<em>In this step-by-step web design layout tutorial, you will discover a method for designing a clean blog design with stunning gradient and lighting effects using Adobe Photoshop.</em></p>
<p><strong>Other resources for wordpress template creation</strong>:</p>
<ul>
<li><strong><a href="http://www.themedreamer.com/" target="_blank" rel='nofollow'>Offical WordPress Documentation</a></strong></li>
<li><strong><a href="http://www.themedreamer.com/" target="_blank" rel='nofollow'>Theme Editor For Dreamweaver</a></strong></li>
<li><strong><a href="http://welovewp.com/" target="_blank" rel='nofollow'>We Love WP!</a></strong></li>
<li><strong><a href="http://www.colourlovers.com/" target="_blank" rel='nofollow'>Ready Made Swatches</a></strong></li>
<li><strong><a href="http://designreviver.com/inspiration/promote-yourself-through-css-galleries/" target="_blank" rel='nofollow'>CSS Galleries</a></strong></li>
<li><strong><a href="http://sxc.hu/" target="_blank" rel='nofollow'>Free Stock Images</a></strong></li>
<li><strong><a href="http://www.flickr.com/creativecommons/" target="_blank" rel='nofollow'>Creative Commons Images at Flickr</a></strong></li>
<li><strong><a href="http://www.yvoschaap.com/wpthemegen/" target="_blank" rel='nofollow'>Basic Theme Creator</a></strong></li>
<li><strong><a href="http://vandelaydesign.com/blog/wordpress/wordpress-theme-design/" target="_blank" rel='nofollow'>More Theme Resouces</a></strong></li>
<li><strong><a href="http://designreviver.com/freebies/6-free-new-social-icons-digg-twitter-stumble-rss-delicious-reddit/" target="_blank" rel='nofollow'>Free Social Icons</a></strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://designstrike.net/wordpress/wordpress-mockup-tutorials-the-best.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
