<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<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/"
	>

<channel>
	<title>Total Tutorials</title>
	<link>http://www.totaltuts.org</link>
	<description>Daily tutorials for beginners to professionals</description>
	<pubDate>Fri, 01 Feb 2008 13:17:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>Creating a simple password protection</title>
		<link>http://www.totaltuts.org/2007/12/25/creating-a-simple-password-protection/</link>
		<comments>http://www.totaltuts.org/2007/12/25/creating-a-simple-password-protection/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 16:02:53 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/creating-a-simple-password-protection/</guid>
		<description><![CDATA[This tutorial will teach you how to create a very simple password protection for your web pages.]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction:</strong></p>
<p>Time to time you may want to protect some of your web pages but you don&#8217;t want to setup any complicated system and a database only for this. In this article I will present you a very simple solution how you can do it easily. I know this solution is not the best but some not mission critical cases it can be very useful.</p>
<p><strong>Step 1.</strong></p>
<p>The main idea is to insert only one line of code into each of your web pages you want to protect. This code includes a form processing script at the beginning of your original code. It first displays a small form to enter your password and if it is ok then shows the original page content.</p>
<p>So now we need to create a PHP script with a simple form processing. The form is very simple, only a password field and a submit button is present. The code is the following:</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />
</font><font color="#007700">function </font><font color="#0000bb">showForm</font><font color="#007700">(</font><font color="#0000bb">$error</font><font color="#007700">=</font><font color="#dd0000">&#8220;LOGIN&#8221;</font><font color="#007700">){<br />
</font><font color="#0000bb">?&gt;<br />
</font>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;<br />
&#8220;DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;body&gt;<br />
<font color="#0000bb">&lt;?php </font><font color="#007700">echo </font><font color="#0000bb">$error</font><font color="#007700">; </font><font color="#0000bb">?&gt;<br />
</font>  &lt;form action=&#8221;<font color="#0000bb">&lt;?php </font><font color="#007700">echo </font><font color="#0000bb">$_SERVER</font><font color="#007700">[</font><font color="#dd0000">&#8216;PHP_SELF&#8217;</font><font color="#007700">]; </font><font color="#0000bb">?&gt;</font>&#8221; method=&#8221;post&#8221; name=&#8221;pwd&#8221;&gt;<br />
Password:<br />
&lt;table&gt;<br />
&lt;tr&gt;<br />
&lt;td&gt;&lt;input name=&#8221;passwd&#8221; type=&#8221;password&#8221;/&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;tr&gt;<br />
&lt;td align=&#8221;center&#8221;&gt;&lt;br/&gt;<br />
&lt;input type=&#8221;submit&#8221; name=&#8221;submit_pwd&#8221; value=&#8221;Login&#8221;/&gt;<br />
&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
<font color="#0000bb">&lt;?php<br />
</font><font color="#007700">}<br />
</font><font color="#0000bb">?&gt;</font> </font></p>
<p><strong>Step 2.</strong></p>
<p>As we don&#8217;t want to show the form always we put it inside a function and this function will be called if necessary. The main application logic checks if the form was submitted or not. If not then displays the form else check the entered password. If it fails then informs the visitor and displays the login form again. If the password was right then we do nothing so the rest of the code will be displayed.</p>
<p>Don&#8217;t forget that in case of displaying the form we need to exit from the code processing to hide the important page content.</p>
<p>The application logic looks like this:</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />
$Password </font><font color="#007700">= </font><font color="#dd0000">&#8216;demo&#8217;</font><font color="#007700">; </font><font color="#ff8000">// Set your password here</font></font></p>
<p><font color="#000000"><font color="#007700">if (isset(</font><font color="#0000bb">$_POST</font><font color="#007700">[</font><font color="#dd0000">&#8217;submit_pwd&#8217;</font><font color="#007700">])){<br />
</font><font color="#0000bb">$pass </font><font color="#007700">= isset(</font><font color="#0000bb">$_POST</font><font color="#007700">[</font><font color="#dd0000">&#8216;passwd&#8217;</font><font color="#007700">]) ? </font><font color="#0000bb">$_POST</font><font color="#007700">[</font><font color="#dd0000">&#8216;passwd&#8217;</font><font color="#007700">] : </font><font color="#dd0000">&#8221;</font><font color="#007700">;</font></font></p>
<p><font color="#000000"><font color="#007700">if (</font><font color="#0000bb">$pass </font><font color="#007700">!= </font><font color="#0000bb">$Password</font><font color="#007700">) {<br />
</font><font color="#0000bb">showForm</font><font color="#007700">(</font><font color="#dd0000">&#8220;Wrong password&#8221;</font><font color="#007700">);<br />
exit();<br />
}<br />
} else {<br />
</font><font color="#0000bb">showForm</font><font color="#007700">();<br />
exit();<br />
}<br />
</font><font color="#0000bb">?&gt;</font> </font></p>
<p>As you can see the password is hard coded and exists in human readable format. If you want you can store it in a separate file and encode it for example with md5() function. All is up to you.</p>
<p><strong>Step 3.</strong></p>
<p>Now we are ready with the script. Now if you want to protect any of your pages you need to insert the following line of code at the beginning of your PHP code:</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php </font><font color="#007700">require_once(</font><font color="#dd0000">&#8216;protector.php&#8217;</font><font color="#007700">); </font><font color="#0000bb">?&gt;</font> </font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/creating-a-simple-password-protection/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Speed up your site with caching</title>
		<link>http://www.totaltuts.org/2007/12/25/speed-up-your-site-with-caching/</link>
		<comments>http://www.totaltuts.org/2007/12/25/speed-up-your-site-with-caching/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 15:58:33 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/speed-up-your-site-with-caching/</guid>
		<description><![CDATA[Speed up your site with caching]]></description>
			<content:encoded><![CDATA[<p>As your site is growing you need focus more and more on site performance. If your content is not changing in every minutes but you have a lot of visitors then your webserver is making a lot of unnecessary work. The server processes your PHP scripts always, however the output is the same. Using cache mechanism we will process the script once but use it more times.</p>
<p>&nbsp;</p>
<p><strong>How it works</strong></p>
<p>&nbsp;</p>
<p>The cache mechanism is not so complicated. The main idea is that we store the processed output in a file and in case of a new request we check if the file exists or not. If it exists and not to old then we just send the file content to the client. If the file doesn&#8217;t exists or to old then we process the PHP script. We can save a lot of time in case of scripts with&nbsp; intensive database usage.&nbsp;</p>
<p>&nbsp;</p>
<p><strong>Implementation</strong>&nbsp;</p>
<p>&nbsp;</p>
<p>We will create a separate new Cache class which has 3 important functions:</p>
<ul>
<li>starteCache()</li>
<li>endCache()</li>
<li>cleanCache()</li>
</ul>
<p>&nbsp;</p>
<p><strong>The class skeleton</strong></p>
<p>&nbsp;</p>
<p>Before we begin to implement the functions we need to create the skeleton of the class with the class variables. We need to define class variables to control cache behaviour. See the comments in the code below:</p>
<p>&nbsp;</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php</p>
<p></font><font color="#007700">class&nbsp;</font><font color="#0000bb">Cache&nbsp;</font><font color="#007700">{<br />&nbsp;&nbsp;&nbsp;var&nbsp;</font><font color="#0000bb">&#036;status&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">true</font><font color="#007700">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;True&nbsp;to&nbsp;switch&nbsp;on&nbsp;cache&nbsp;and&nbsp;false&nbsp;to&nbsp;switch&nbsp;it&nbsp;off<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">var&nbsp;</font><font color="#0000bb">&#036;cacheDir&nbsp;&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#dd0000">&#8216;cache/&#8217;</font><font color="#007700">;&nbsp;</font><font color="#ff8000">//&nbsp;The&nbsp;default&nbsp;directory&nbsp;where&nbsp;to&nbsp;store&nbsp;chached&nbsp;files<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">var&nbsp;</font><font color="#0000bb">&#036;cacheFile&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#dd0000">&#8221;</font><font color="#007700">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;The&nbsp;content&nbsp;of&nbsp;the&nbsp;actual&nbsp;cached&nbsp;file<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">var&nbsp;</font><font color="#0000bb">&#036;timeOut&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">1000</font><font color="#007700">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;The&nbsp;time&nbsp;how&nbsp;long&nbsp;the&nbsp;cached&nbsp;file&nbsp;remains&nbsp;reusable<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">var&nbsp;</font><font color="#0000bb">&#036;startTime&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">0</font><font color="#007700">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;The&nbsp;startime&nbsp;to&nbsp;determine&nbsp;script&nbsp;execution&nbsp;time&nbsp;<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">var&nbsp;</font><font color="#0000bb">&#036;cache&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">true</font><font color="#007700">;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;Shows&nbsp;if&nbsp;chaching&nbsp;actual&nbsp;content&nbsp;is&nbsp;needed<br />&nbsp;&nbsp;&nbsp;<br /></font><font color="#007700">}<br /></font><font color="#0000bb">?></font> </font> </p>
<p>&nbsp;</p>
<p>Besides the class variables we define an internally used function to measure the time we spent with processing. This is the getMicroTime() function and looks like this:</p>
<p>&nbsp;</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">function&nbsp;</font><font color="#0000bb">getMicroTime</font><font color="#007700">()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list(</font><font color="#0000bb">&#036;usec</font><font color="#007700">,&nbsp;</font><font color="#0000bb">&#036;sec</font><font color="#007700">)&nbsp;=&nbsp;</font><font color="#0000bb">explode</font><font color="#007700">(</font><font color="#dd0000">&#8220;&nbsp;&#8221;</font><font color="#007700">,</font><font color="#0000bb">microtime</font><font color="#007700">());<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;((float)</font><font color="#0000bb">&#036;usec&nbsp;</font><font color="#007700">+&nbsp;(float)</font><font color="#0000bb">&#036;sec</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></font><font color="#0000bb">?></font> </font> </p>
<p>&nbsp;</p>
<p><strong>The startCache() function</strong>&nbsp;</p>
<p>Now we can start with the most important function of our class. The use case of the startCache() function is the following:</p>
<ul>
<li>Save actual time</li>
<li>Check file existence and age.</li>
<ul>
<li>If file exists and not to old then display its content and exit.</li>
</ul>
<li>If file doesn&#8217;t exists then set a caching flag to true.</li>
</ul>
<p>The code is the following:</p>
<p>&nbsp;</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">function&nbsp;</font><font color="#0000bb">startCache</font><font color="#007700">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">startTime&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">getMicroTime</font><font color="#007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">status</font><font color="#007700">){&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheFile&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheDir</font><font color="#007700">.</font><font color="#0000bb">urlencode</font><font color="#007700">(&nbsp;</font><font color="#0000bb">&#036;_SERVER</font><font color="#007700">[</font><font color="#dd0000">&#8216;REQUEST_URI&#8217;</font><font color="#007700">]&nbsp;);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;(</font><font color="#0000bb">file_exists</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheFile</font><font color="#007700">))&nbsp;&amp;&amp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;((</font><font color="#0000bb">fileatime</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheFile</font><font color="#007700">)&nbsp;+&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">timeOut</font><font color="#007700">)&nbsp;>&nbsp;</font><font color="#0000bb">time</font><font color="#007700">())&nbsp;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//Read&nbsp;file&nbsp;from&nbsp;the&nbsp;cache<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;handle&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">fopen</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheFile&nbsp;</font><font color="#007700">,&nbsp;</font><font color="#dd0000">&#8220;r&#8221;</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;html&nbsp;&nbsp;&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">fread</font><font color="#007700">(</font><font color="#0000bb">&#036;handle</font><font color="#007700">,</font><font color="#0000bb">filesize</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheFile</font><font color="#007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">fclose</font><font color="#007700">(</font><font color="#0000bb">&#036;handle</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;Display&nbsp;the&nbsp;content<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">echo&nbsp;</font><font color="#0000bb">&#036;html</font><font color="#007700">;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//Display&nbsp;the&nbsp;rendering&nbsp;time<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">echo&nbsp;</font><font color="#dd0000">&#8216;&lt;p>Total&nbsp;time:&nbsp;&#8217;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">.</font><font color="#0000bb">round</font><font color="#007700">((</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">getMicroTime</font><font color="#007700">())-(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">startTime</font><font color="#007700">),</font><font color="#0000bb">4</font><font color="#007700">).</font><font color="#dd0000">&#8216;&lt;/p>&#8217;</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//Exit&nbsp;from&nbsp;the&nbsp;code&nbsp;as&nbsp;we&nbsp;displayed&nbsp;cached&nbsp;data<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">exit();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//&nbsp;Set&nbsp;to&nbsp;save&nbsp;generated&nbsp;content&nbsp;into&nbsp;file<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">caching&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">true</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></font><font color="#0000bb">?></font> </font> </p>
<p>&nbsp;</p>
<p><strong>The endCache() function</strong>&nbsp;</p>
<p>&nbsp;</p>
<p>If the actual page was not cached yet and the caching flag is set to true then this function will save the output buffer to a file and of course displays it as well. At the end just for information it displays the total processing time as well. The source looks like this:</p>
<p>&nbsp;</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">function&nbsp;</font><font color="#0000bb">endCache</font><font color="#007700">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">status</font><font color="#007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(&nbsp;</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">caching&nbsp;</font><font color="#007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//You&nbsp;were&nbsp;caching&nbsp;the&nbsp;contents&nbsp;so&nbsp;display&nbsp;them,&nbsp;and&nbsp;write&nbsp;the&nbsp;cache&nbsp;file<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;html&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">ob_get_clean</font><font color="#007700">();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</font><font color="#0000bb">&#036;html</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;handle&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">fopen</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheFile</font><font color="#007700">,&nbsp;</font><font color="#dd0000">&#8216;w&#8217;&nbsp;</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">fwrite&nbsp;</font><font color="#007700">(</font><font color="#0000bb">&#036;handle</font><font color="#007700">,&nbsp;</font><font color="#0000bb">&#036;html&nbsp;</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">fclose&nbsp;</font><font color="#007700">(</font><font color="#0000bb">&#036;handle</font><font color="#007700">);</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#ff8000">//Display&nbsp;the&nbsp;rendering&nbsp;time<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">echo&nbsp;</font><font color="#dd0000">&#8216;&lt;p>Total&nbsp;time:&nbsp;&#8217;</font><font color="#007700">.</font><font color="#0000bb">round</font><font color="#007700">((</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">getMicroTime</font><font color="#007700">()-</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">startTime</font><font color="#007700">),</font><font color="#0000bb">4</font><font color="#007700">).</font><font color="#dd0000">&#8216;&lt;/p>&#8217;</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;<br /></font><font color="#0000bb">?></font> </font> </p>
<p>&nbsp;</p>
<p><strong>The cleanCache()</strong>&nbsp;</p>
<p>This is the last function and it is quite simple. This function only checks the cache directory and removes all of the files in it. </p>
<p>&nbsp;</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#007700">function&nbsp;</font><font color="#0000bb">cleanCache</font><font color="#007700">(){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</font><font color="#0000bb">&#036;handle&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">opendir</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheDir</font><font color="#007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while&nbsp;(</font><font color="#0000bb">false&nbsp;</font><font color="#007700">!==&nbsp;(</font><font color="#0000bb">&#036;file&nbsp;</font><font color="#007700">=&nbsp;</font><font color="#0000bb">readdir</font><font color="#007700">(</font><font color="#0000bb">&#036;handle</font><font color="#007700">)))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(</font><font color="#0000bb">is_file</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheDir</font><font color="#007700">.</font><font color="#0000bb">&#036;file</font><font color="#007700">))&nbsp;</font><font color="#0000bb">unlink</font><font color="#007700">(</font><font color="#0000bb">&#036;this</font><font color="#007700">-></font><font color="#0000bb">cacheDir</font><font color="#007700">.</font><font color="#0000bb">&#036;file</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">closedir</font><font color="#007700">(</font><font color="#0000bb">&#036;handle</font><font color="#007700">);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></font><font color="#0000bb">?></font> </font> </p>
<p>&nbsp;</p>
<p><strong>Usage of the class</strong>&nbsp;</p>
<p>If you want to cache your pages you need to extend your code a bit with the new cache class. It only takes some line of code. First we need to import the cache class and create a cache object afterwards. As we have the object we can call the startCache() function. At the end of the file we need to insert the endCache() function and we are ready.</p>
<p>&nbsp;</p>
<p>An example code looks like this:</p>
<p>&nbsp;</p>
<p><font color="#000000"> <font color="#0000bb">&lt;?php<br />&nbsp;&nbsp;&nbsp;</font><font color="#007700">require_once(</font><font color="#dd0000">&#8216;cache.class.php&#8217;</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;CacheManager&nbsp;</font><font color="#007700">=&nbsp;new&nbsp;</font><font color="#0000bb">Cache</font><font color="#007700">();<br />&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;CacheManager</font><font color="#007700">-></font><font color="#0000bb">startCache</font><font color="#007700">();<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</font><font color="#dd0000">&#8220;Start&nbsp;Cache&nbsp;example&nbsp;at:&nbsp;&#8221;</font><font color="#007700">.</font><font color="#0000bb">date</font><font color="#007700">(</font><font color="#dd0000">&#8216;H:i:s&#8217;</font><font color="#007700">).</font><font color="#dd0000">&#8220;&lt;br/>&#8221;</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">sleep</font><font color="#007700">(</font><font color="#0000bb">2</font><font color="#007700">);<br />&nbsp;&nbsp;&nbsp;echo&nbsp;</font><font color="#dd0000">&#8220;End&nbsp;Cache&nbsp;example&nbsp;at:&nbsp;&#8221;</font><font color="#007700">.</font><font color="#0000bb">date</font><font color="#007700">(</font><font color="#dd0000">&#8216;H:i:s&#8217;</font><font color="#007700">).</font><font color="#dd0000">&#8220;&lt;br/>&#8221;</font><font color="#007700">;</p>
<p>&nbsp;&nbsp;&nbsp;echo&nbsp;</font><font color="#dd0000">&#8220;&lt;br/>&lt;a&nbsp;href=&#8217;clear.php&#8217;>Clean&nbsp;the&nbsp;cache&lt;/a>&lt;br/>&#8221;</font><font color="#007700">;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;</font><font color="#0000bb">&#036;CacheManager</font><font color="#007700">-></font><font color="#0000bb">endCache</font><font color="#007700">();<br />&nbsp;&nbsp;&nbsp;<br /></font><font color="#0000bb">?></font> </font> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/speed-up-your-site-with-caching/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Check your server status - a basic ping</title>
		<link>http://www.totaltuts.org/2007/12/25/check-your-server-status-a-basic-ping/</link>
		<comments>http://www.totaltuts.org/2007/12/25/check-your-server-status-a-basic-ping/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 15:49:49 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/check-your-server-status-a-basic-ping/</guid>
		<description><![CDATA[I will show you how to check whether a domain, server is up or down and how fast it is.]]></description>
			<content:encoded><![CDATA[<p><span>In this tutorial I will show you how to check whether a domain, server is up or down and how fast it is. Generally speaking we will implement a ping command with PHP.</span>  <span> </span>  <strong><span></span></strong></p>
<p><strong>Step 1.</strong><br />
<span>PHP has no built in function for the ping functionality so we need to find a way how to realize it. We want to know two information about the given domain. First of all we want to know whether it is available or not and as second it would be nice to get information about how fast the response is.</span></p>
<p><span>The main concept is that we try to connect to the server with socket connection on port 80 and measure the time how long does it take. To do this we will use the built in PHP function <strong>fsockopen()</strong> which opens Internet or Unix domain socket connection. On depends the return value we can decide whether the actual domain is available at the moment or not. </span>  <span></span></p>
<p>Let’s do some coding.  <strong><span></span></strong></p>
<p><strong>Step 2.</strong><br />
<span>First we will implement the main function which will get a domain name as parameter and try to open it. The function will returns with the response time if the connection was success and -1 in other case. <span> </span>The function makes no input validation so it must be done before calling it. I will show it later. </span>  <span></span></p>
<p>Let’s see the main steps:</p>
<ul>
<li><span>Save current time as startTime</span></li>
<li><span style="font-family: Symbol"></span><span>Try to connect to the domain</span></li>
<li><span style="font-family: Symbol"></span><span>Save current time again as stopTime</span></li>
<li><span style="font-family: Symbol"></span><span>Check the return value</span>
<ul>
<li><span></span><span>In case of error return with -1</span></li>
<li><span></span><span>In case of successfully connection calculate the time in ms and return with it.</span></li>
</ul>
</li>
</ul>
<p><span>The code looks like this:</span><span style="color: #000000"> <span style="color: #0000bb"></span></span></p>
<p>&lt;?php<br />
<!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]--><!--[if !supportLists]--><!--[endif]-->  <span style="color: #000000"><span style="color: #0000bb"><br />
</span><span style="color: #ff8000">// Function to check response time<br />
</span><span style="color: #007700">function </span><span style="color: #0000bb">pingDomain</span><span style="color: #007700">(</span><span style="color: #0000bb">$domain</span><span style="color: #007700">){<br />
</span><span style="color: #0000bb">$starttime </span><span style="color: #007700">= </span><span style="color: #0000bb">microtime</span><span style="color: #007700">(</span><span style="color: #0000bb">true</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$file      </span><span style="color: #007700">= </span><span style="color: #0000bb">fsockopen </span><span style="color: #007700">(</span><span style="color: #0000bb">$domain</span><span style="color: #007700">, </span><span style="color: #0000bb">80</span><span style="color: #007700">, </span><span style="color: #0000bb">$errno</span><span style="color: #007700">, </span><span style="color: #0000bb">$errstr</span><span style="color: #007700">, </span><span style="color: #0000bb">10</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$stoptime  </span><span style="color: #007700">= </span><span style="color: #0000bb">microtime</span><span style="color: #007700">(</span><span style="color: #0000bb">true</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$status    </span><span style="color: #007700">= </span><span style="color: #0000bb">0</span><span style="color: #007700">;</span></span></p>
<p>if (!<span style="color: #0000bb">$file</span><span style="color: #007700">) </span><span style="color: #0000bb">$status </span><span style="color: #007700">= -</span><span style="color: #0000bb">1</span><span style="color: #007700">;  </span><span style="color: #ff8000">// Site is down<br />
</span><span style="color: #007700">else {<br />
</span><span style="color: #0000bb">fclose</span><span style="color: #007700">(</span><span style="color: #0000bb">$file</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$status </span><span style="color: #007700">= (</span><span style="color: #0000bb">$stoptime </span><span style="color: #007700">- </span><span style="color: #0000bb">$starttime</span><span style="color: #007700">) * </span><span style="color: #0000bb">1000</span><span style="color: #007700">;<br />
</span><span style="color: #0000bb">$status </span><span style="color: #007700">= </span><span style="color: #0000bb">floor</span><span style="color: #007700">(</span><span style="color: #0000bb">$status</span><span style="color: #007700">);<br />
}<br />
return </span><span style="color: #0000bb">$status</span><span style="color: #007700">;<br />
}<br />
</span><span style="color: #0000bb">?&gt;</span></p>
<p><strong><span>Step 3.</span></strong><br />
<span>Now let’s create some usable environment for our function. It means that we will create a HTML form where the visitor can define the domain name in a normal text field. <span> </span>As action parameter we will call our script again. I use no any special formatting and CSS to make this example as simple as it can be and focus only on the main topic.</span></p>
<p>The resulted form is quite simple:</p>
<p><span style="color: #000000">       &lt;form action=&#8221;<span style="color: #0000bb">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000bb">$_SERVER</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8216;PHP_SELF&#8217;</span><span style="color: #007700">]; </span><span style="color: #0000bb">?&gt;</span>&#8221; method=&#8221;post&#8221; name=&#8221;domain&#8221;&gt;<br />
Domain name:<br />
&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;input name=&#8221;domainname&#8221; type=&#8221;text&#8221; &gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;submitBtn&#8221; value=&#8221;Ping domain&#8221;&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;</span></p>
<p><span>During the form processing we need to validate the domain name. In this case it means that to be sure we remove the http:// prefix if it was submitted with the domain name. Here you can add more validation routines if you want. Now we can call the above implemented function with the given domain and display the result depending on the return value.</span></p>
<p><span> </span>  <span style="color: #000000"> <span style="color: #0000bb">&lt;?php<br />
</span><span style="color: #ff8000">// Check whether the for was submitted<br />
</span><span style="color: #007700">if (isset(</span><span style="color: #0000bb">$_POST</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8217;submitBtn&#8217;</span><span style="color: #007700">])){<br />
</span><span style="color: #0000bb">$domainbase </span><span style="color: #007700">= (isset(</span><span style="color: #0000bb">$_POST</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8216;domainname&#8217;</span><span style="color: #007700">])) ? </span><span style="color: #0000bb">$_POST</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8216;domainname&#8217;</span><span style="color: #007700">] : </span><span style="color: #dd0000">&#8221;</span><span style="color: #007700">;<br />
</span><span style="color: #0000bb">$domainbase </span><span style="color: #007700">= </span><span style="color: #0000bb">str_replace</span><span style="color: #007700">(</span><span style="color: #dd0000">&#8220;http://&#8221;</span><span style="color: #007700">,</span><span style="color: #dd0000">&#8220;&#8221;</span><span style="color: #007700">,</span><span style="color: #0000bb">strtolower</span><span style="color: #007700">(</span><span style="color: #0000bb">$domainbase</span><span style="color: #007700">));</span></span></p>
<p>echo <span style="color: #dd0000">&#8216;&lt;table&gt;&#8217;</span><span style="color: #007700">;</span></p>
<p><span style="color: #0000bb">$status </span><span style="color: #007700">= </span><span style="color: #0000bb">pingDomain</span><span style="color: #007700">(</span><span style="color: #0000bb">$domainbase</span><span style="color: #007700">);<br />
if (</span><span style="color: #0000bb">$status </span><span style="color: #007700">!= -</span><span style="color: #0000bb">1</span><span style="color: #007700">) echo </span><span style="color: #dd0000">&#8220;&lt;tr&gt;&lt;td&gt;http://$domainbase is ALIVE ($status ms)&lt;/td&gt;&lt;tr&gt;&#8221;</span><span style="color: #007700">;<br />
else               echo </span><span style="color: #dd0000">&#8220;&lt;tr&gt;&lt;td&gt;http://$domainbase is DOWN&lt;/td&gt;&lt;tr&gt;&#8221;</span><span style="color: #007700">;</span></p>
<p>echo <span style="color: #dd0000">&#8216;&lt;/table&gt;&#8217;</span><span style="color: #007700">;<br />
}<br />
</span><span style="color: #0000bb">?&gt;</span></p>
<p><span>And we are all done.</span></p>
<p><span>The complete code looks like this:</span></p>
<p><span style="color: #000000"><span style="color: #0000bb">&lt;?php<br />
</span><span style="color: #ff8000">// Function to check response time<br />
</span><span style="color: #007700">function </span><span style="color: #0000bb">pingDomain</span><span style="color: #007700">(</span><span style="color: #0000bb">$domain</span><span style="color: #007700">){<br />
</span><span style="color: #0000bb">$starttime </span><span style="color: #007700">= </span><span style="color: #0000bb">microtime</span><span style="color: #007700">(</span><span style="color: #0000bb">true</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$file      </span><span style="color: #007700">= </span><span style="color: #0000bb">fsockopen </span><span style="color: #007700">(</span><span style="color: #0000bb">$domain</span><span style="color: #007700">, </span><span style="color: #0000bb">80</span><span style="color: #007700">, </span><span style="color: #0000bb">$errno</span><span style="color: #007700">, </span><span style="color: #0000bb">$errstr</span><span style="color: #007700">, </span><span style="color: #0000bb">10</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$stoptime  </span><span style="color: #007700">= </span><span style="color: #0000bb">microtime</span><span style="color: #007700">(</span><span style="color: #0000bb">true</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$status    </span><span style="color: #007700">= </span><span style="color: #0000bb">0</span><span style="color: #007700">;</span></span></p>
<p>if (!<span style="color: #0000bb">$file</span><span style="color: #007700">) </span><span style="color: #0000bb">$status </span><span style="color: #007700">= -</span><span style="color: #0000bb">1</span><span style="color: #007700">;  </span><span style="color: #ff8000">// Site is down<br />
</span><span style="color: #007700">else {<br />
</span><span style="color: #0000bb">fclose</span><span style="color: #007700">(</span><span style="color: #0000bb">$file</span><span style="color: #007700">);<br />
</span><span style="color: #0000bb">$status </span><span style="color: #007700">= (</span><span style="color: #0000bb">$stoptime </span><span style="color: #007700">- </span><span style="color: #0000bb">$starttime</span><span style="color: #007700">) * </span><span style="color: #0000bb">1000</span><span style="color: #007700">;<br />
</span><span style="color: #0000bb">$status </span><span style="color: #007700">= </span><span style="color: #0000bb">floor</span><span style="color: #007700">(</span><span style="color: #0000bb">$status</span><span style="color: #007700">);<br />
}<br />
return </span><span style="color: #0000bb">$status</span><span style="color: #007700">;<br />
}<br />
</span><span style="color: #0000bb">?&gt;<br />
</span><br />
&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221; &#8220;DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;form action=&#8221;<span style="color: #0000bb">&lt;?php </span><span style="color: #007700">echo </span><span style="color: #0000bb">$_SERVER</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8216;PHP_SELF&#8217;</span><span style="color: #007700">]; </span><span style="color: #0000bb">?&gt;</span>&#8221; method=&#8221;post&#8221; name=&#8221;domain&#8221;&gt;<br />
Domain name:<br />
&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;input name=&#8221;domainname&#8221; type=&#8221;text&#8221; &gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;input type=&#8221;submit&#8221; name=&#8221;submitBtn&#8221; value=&#8221;Ping domain&#8221;&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/form&gt;<br />
<span style="color: #0000bb">&lt;?php<br />
</span><span style="color: #ff8000">// Check whether the for was submitted<br />
</span><span style="color: #007700">if (isset(</span><span style="color: #0000bb">$_POST</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8217;submitBtn&#8217;</span><span style="color: #007700">])){<br />
</span><span style="color: #0000bb">$domainbase </span><span style="color: #007700">= (isset(</span><span style="color: #0000bb">$_POST</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8216;domainname&#8217;</span><span style="color: #007700">])) ? </span><span style="color: #0000bb">$_POST</span><span style="color: #007700">[</span><span style="color: #dd0000">&#8216;domainname&#8217;</span><span style="color: #007700">] : </span><span style="color: #dd0000">&#8221;</span><span style="color: #007700">;<br />
</span><span style="color: #0000bb">$domainbase </span><span style="color: #007700">= </span><span style="color: #0000bb">str_replace</span><span style="color: #007700">(</span><span style="color: #dd0000">&#8220;http://&#8221;</span><span style="color: #007700">,</span><span style="color: #dd0000">&#8220;&#8221;</span><span style="color: #007700">,</span><span style="color: #0000bb">strtolower</span><span style="color: #007700">(</span><span style="color: #0000bb">$domainbase</span><span style="color: #007700">));</span></p>
<p>echo <span style="color: #dd0000">&#8216;&lt;table&gt;&#8217;</span><span style="color: #007700">;</span></p>
<p><span style="color: #0000bb">$status </span><span style="color: #007700">= </span><span style="color: #0000bb">pingDomain</span><span style="color: #007700">(</span><span style="color: #0000bb">$domainbase</span><span style="color: #007700">);<br />
if (</span><span style="color: #0000bb">$status </span><span style="color: #007700">!= -</span><span style="color: #0000bb">1</span><span style="color: #007700">) echo </span><span style="color: #dd0000">&#8220;&lt;tr&gt;&lt;td&gt;http://$domainbase is ALIVE ($status ms)&lt;/td&gt;&lt;tr&gt;&#8221;</span><span style="color: #007700">;<br />
else               echo </span><span style="color: #dd0000">&#8220;&lt;tr&gt;&lt;td&gt;http://$domainbase is DOWN&lt;/td&gt;&lt;tr&gt;&#8221;</span><span style="color: #007700">;</span></p>
<p>echo <span style="color: #dd0000">&#8216;&lt;/table&gt;&#8217;</span><span style="color: #007700">;<br />
}<br />
</span><span style="color: #0000bb">?&gt;<br />
</span>&lt;/body&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/check-your-server-status-a-basic-ping/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Design a Gaming Navigation Interface in Photoshop</title>
		<link>http://www.totaltuts.org/2007/12/25/design-a-gaming-navigation-interface-in-photoshop/</link>
		<comments>http://www.totaltuts.org/2007/12/25/design-a-gaming-navigation-interface-in-photoshop/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 15:28:38 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/design-a-gaming-navigation-interface-in-photoshop/</guid>
		<description><![CDATA[Create a Stylish Gaming Interface for your navigations.]]></description>
			<content:encoded><![CDATA[<p>In this detailed photoshop tutorial you will learn how to create a Stylish Gaming Interface for your navigations.</p>
<p><a id="more-59"></a></p>
<p><span class="step">Step 1:</span></p>
<p>Let’s start out by creating a new file. I used a 1000×130 pixels canvas set at 72dpi, and I filled my background with a black color. Then on your tools palette set the foreground color to a dark gray, color code #383838.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/1.gif" /></p>
<p><span class="step">Step 2:</span></p>
<p>Create a new layer and using the Rectangle Tool draw a dark gray rectangle with an exact size of 1000×22 px.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/2.gif" /></p>
<p><span class="step">Step 3:</span></p>
<p>Under Layer Style(Layer &gt; Layer Style) add an Inner Shadow blending option to your  dark gray rectangle layer.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/3.gif" /></p>
<p><span class="step">Step 4:</span></p>
<p>Now add an Gradient Overlay blending option.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/4.gif" /></p>
<p><span class="step">Step 5:</span></p>
<p>Your dark gray rectangle should now have a gradient effect.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/5.gif" /></p>
<p><span class="step">Step 6:</span></p>
<p>Now make another layer and draw a black rectangle covering your gradient rectangle.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/6.gif" /></p>
<p><span class="step">Step 7:</span></p>
<p>Under Layer Style(Layer &gt; Layer Style) add a Inner Shadow and Gradient Overlay blending option to your black rectangle.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/7b.gif" /></p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/7.gif" /></p>
<p><span class="step">Step 8:</span></p>
<p>On the layers palette set the blending mode of your black rectangle to Lighten. This should add another layer of detail on your rectangle designs.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/8.gif" /></p>
<p><span class="step">Step 9:</span></p>
<p>Create a new layer and below your gradient rectangle draw a thick white line, exact size of 1000×5 px.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/9.gif" /></p>
<p><span class="step">Step 10:</span></p>
<p>Back on your Layers Palette set the opacity level of your thick line layer to 24%.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/10.gif" /></p>
<p><span class="step">Step 11:</span></p>
<p>Select your Horizontal Type Tool and above your screen under the options palette set the font family to Verdana, regular, 10 pt, crisp and white for color.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/11.gif" /></p>
<p><span class="step">Step 12:</span></p>
<p>Now add your first set of navigation, here we added the systems from PC, Xbox 360 to Wireless. Make sure you set-up your navigation with spaces and a black pipe bar between each link. Then on your layers palette set the opacity level to 66%.</p>
<p><img src="http://originmaker.com/DesignTips/GamingNavigationInterface/images/12.gif" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/design-a-gaming-navigation-interface-in-photoshop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Remove Wrinkles with the Healing Brush</title>
		<link>http://www.totaltuts.org/2007/12/25/remove-wrinkles-with-the-healing-brush/</link>
		<comments>http://www.totaltuts.org/2007/12/25/remove-wrinkles-with-the-healing-brush/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 15:16:55 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/remove-wrinkles-with-the-healing-brush/</guid>
		<description><![CDATA[Remove Wrinkles with the Healing Brush]]></description>
			<content:encoded><![CDATA[<p>Use Photoshop&#8217;s Healing Brush And Patch Tool To Remove Wrinkles</p>
<p>The clone tool is one of the most often used tools when it comes to retouching in Photoshop. But two other tools that are often overlooked by people new to the sport are the Healing Brush and the Patch tools.</p>
<p><img src="/images/remove-wrinkles-healing-brush-10.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="205" hspace="22" width="468" /></p>
<p>In this tutorial, I’m going to show you how to remove some wrinkles from an elderly lady’s face. To ensure that we get a realistic result we’ll firstly duplicate the background layer and carry out all changes on this duplicate layer. On completion of retouching, we’ll use the two layers together to get a more natural look.</p>
<p><strong><span class="title-blog"><em>Retouching on a separate layer</em></span></strong></p>
<p>One way to protect your original image is to do your retouching work on a duplicate layer of the original image. Then, you can retouch the duplicate layer. When you finish retouching, you can blend the two layers. This technique usually enhances the results, making your retouching work look more natural and realistic. The Healing Brush tool uses sample pixels from an image to let you correct imperfections. The amazing thing about the Healing Brush is that it also matches the lighting, shading, texture and transparency of the sampled pixels to the pixels being healed. It results in a very natural looking image.</p>
<p><strong><span class="title-blog">STEP 1</span></strong></p>
<p>Open up the image that you want to retouch. I’m working on a portrait photograph of an older lady.</p>
<p><img src="/images/remove-wrinkles-healing-brush-01.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="256" hspace="66" width="384" /></p>
<p><strong><span class="title-blog">STEP 2</span></strong></p>
<p>In the Layers palette, click on the Background layer and then press Ctrl+J to create a duplicate layer. Double-click the new layer (called Layer 1), and rename it Repairs and press Enter (Windows) or Return (Mac OS). Leave this new layer selected (highlighted in blue).</p>
<p><img src="/images/remove-wrinkles-healing-brush-03.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="201" hspace="122" width="216" /></p>
<p><strong><span class="title-blog">STEP 3</span></strong></p>
<p>In the toolbox, select the Healing Brush tool , which may be hidden under the Patch tool .</p>
<p><img src="/images/remove-wrinkles-healing-brush-02.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="82" hspace="122" width="224" /></p>
<p><strong><span class="title-blog">STEP 4</span></strong></p>
<p>On the tool options bar, open the Brush pop-up palette and set the brush diameter to a suitable size – you need it to be big enough to cover wrinkle lines – I chose 12 pixels. Close the palette and select the Aligned check box. Leave the other settings at their defaults ( Normal selected as the Mode option and Sampled selected for Source).</p>
<p><img src="/images/remove-wrinkles-healing-brush-04.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="23" width="500" /></p>
<p>Notice the two wrinkles running horizontally across the man’s forehead. (Zoom in if necessary.)</p>
<p><strong><span class="title-blog">STEP 5</span></strong></p>
<p>Hold down Alt (Windows) or Option (Mac OS) and click a smooth area of the forehead, on the left side of the image, to set the sample point. Then, drag the Healing Brush tool over the lower of the two forehead wrinkles. As you drag, you’ll notice that the painted pixels don’t exactly match the subject’s natural skin tones. When you release the mouse button, however, the colours correct themselves so that the wrinkle is covered and the skin looks quite natural.</p>
<p><strong><span class="title-blog">STEP 6</span></strong></p>
<p>Continue painting with the Healing Brush tool to remove the upper forehead wrinkle and the furrow line between the eyebrows.</p>
<p><img src="/images/remove-wrinkles-healing-brush-05.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="152" hspace="66" width="364" /></p>
<p><strong><em><span class="title-blog">Patching and softening<br />
</span></em></strong></p>
<p><strong><em>										</em></strong>The Patch tool combines the selection behavior of the Lasso tool with the colour-blending properties of the Healing Brush tool. With the Patch tool, you can select an area that you want to use as the source (area to be fixed) or destination (area used to do the fixing). Then, you drag the Patch tool marquee to another part of the image. When you release the mouse button, the Patch tool completes the job. Make sure that the Retouch layer is selected in the Layers palette before you continue.</p>
<p><strong><span class="title-blog">STEP 1</span></strong></p>
<p>In the toolbox, select the Patch tool (), hidden under the Healing Brush tool ().</p>
<p><img src="/images/remove-wrinkles-healing-brush-06.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="82" hspace="111" width="224" /></p>
<p><strong><span class="title-blog">STEP 2</span></strong></p>
<p>Drag a marquee around the wrinkles under the eye.</p>
<p><img src="/images/remove-wrinkles-healing-brush-07.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="273" hspace="111" width="242" /></p>
<p>Move the Patch tool inside the selected area and drag it to a smooth, similarly toned area on the forehead. Let go of the mouse key and voila! Wrinkles removed. You’ll notice that the marquee stays active over the repaired area, ready to be dragged again, either to another area that needs patching (if the Destination option is selected) or to another sampling site (if the Source option is selected).</p>
<p><strong><span class="title-blog">STEP 3</span></strong></p>
<p>Continue to use the same technique to erase the wrinkles under the other eye.</p>
<p><strong><span class="title-blog">STEP 4</span></strong></p>
<p>Continue to touch up other parts of the subject’s face with the Patch tool until most of the wrinkles are hidden, or at least softened. It’s very important that cosmetic touchups on the human face look as natural as possible. To make sure that things are looking too smooth or plastic looking, we’re going to reduce the opacity on the repairs layer so that we can see a few of the wrinkles coming up from the bottom layer.</p>
<p><strong><span class="title-blog">STEP 5</span></strong></p>
<p>In the Layers palette, change the Opacity value of the Retouch layer to about 60%. Now, hints of the heaviest skin creases appear in the image – a bit more realism. The lady should have at least A FEW wrinkles!</p>
<p><img src="/images/remove-wrinkles-healing-brush-08.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="256" hspace="55" width="385" /></p>
<p><strong><span class="title-blog">STEP 6<br />
</span></strong></p>
<p><strong>									</strong>Click the eye icon to toggle the Repairs layer on and off. You should see a fairly large difference between the original image and the retouched one. Before (left) and After (right).</p>
<p><img src="/images/remove-wrinkles-healing-brush-09.jpg" alt="Use Photoshop's Healing Brush And Patch Tool To Remove Wrinkles - Photoshop Tutorial" border="0" height="205" hspace="22" width="468" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/remove-wrinkles-with-the-healing-brush/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Vector Polishing Techniques</title>
		<link>http://www.totaltuts.org/2007/12/25/vector-polishing-techniques/</link>
		<comments>http://www.totaltuts.org/2007/12/25/vector-polishing-techniques/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 14:55:00 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/13/</guid>
		<description><![CDATA[Add more depth, color, contrast, and texture into your vector art.]]></description>
			<content:encoded><![CDATA[<p class="intro">Someone emailed me and asked how did I do the illustration background on <a href="http://www.next2friends.com">Next2Friends.</a> It inspired me to write this article. He asked &#8220;Did I do it in Photoshop or Illustrator?&#8221; Well, it is a mixture of both. First I created the artwork in Illustrator, then polished it in Photoshop. Here I will unveil all my secret techniques. This tutorial includes 9 Photoshop techniques that will show you how to add more depth, color, contrast, and texture into your vector art.<span id="more-108"></span></p>
<h3>Why do I need to polish the vector art?</h3>
<p>Vector artworks are usually very flat, dull, and lack visual effects due to software limitations; thus they look very boring. Unless you want that &#8220;flat and dull&#8221; appearance, otherwise you should polish your vector in Photoshop. By polishing vector art, you can: make the color more vivid, bring up the contrast, texturize the artwork, and add more life and depth to the image. Here are some of my work samples (before and after polish).</p>
<ul class="gallery">
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample1-before-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample1-before.jpg" alt="before" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample1-after-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample1-after.jpg" alt="after" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample2-before-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample2-before.jpg" alt="before" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample2-after-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample2-after.jpg" alt="after" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample3-before-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample3-before.jpg" alt="before" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample3-after-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample3-after.jpg" alt="after" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample4-before-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample4-before.jpg" alt="before" /></a></li>
<li><a href="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample4-after-large.jpg" class="thickbox" rel="before-after"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/sample4-after.jpg" alt="after" /></a></li>
</ul>
<h3><em>Technique 1:</em> Lens Flare Effect</h3>
<p class="image right"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/n2f-lens-flare.jpg" alt="N2F lens flare" /></p>
<p>First technique, let’s start with one of my recent work on <a href="http://www.next2friends.com">Next2Friends</a>. I will show you how to create a stunning lens flare effect in two simple steps.</p>
<p>I assume you have the vector artwork ready and you want to add a lens flare layer on top. First create a new layer on top and fill it with black color. Go to Filter &gt; Render &gt; Lens Flare. Then, set the layer’s blending mode to Screen. Done. Isn’t that nice and easy?</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/lens-flare-1.jpg" alt="Lens flare 1" /></p>
<p>If you want the lens flare to focus on specify area only, you can delete the unwanted area. Make a circle selection, feather the selection (Cmd + Opt + D) by 10 to 20px, inverse selection (Cmd + Shift + i), and hit Delete key.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/lens-flare-2.jpg" alt="Lens flare 2" /></p>
<p>Sometime just the Lens Flare filter alone is not good enough. You can make it even better by manually adding more colorful circles and glows.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/lens-flare-3.jpg" alt="Lens flare 3" /></p>
<h3><em>Technique 2:</em> Colorful and Dusty Effect</h3>
<p class="image right"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/colorful-dusty.jpg" alt="Colorful and dusty" /></p>
<p>This is one of my common styles that can be found in most of my <a href="http://www.ndesign-studio.com/portfolio/graphic/">design work</a>. Again, it is very easy. It can be done in two easy steps.</p>
<p>Use the Radial Gradient tool, randomly draw some soft edge glows on a layer and set the layer blending mode to Dissolve.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/dusty1.jpg" alt="Dusty effect 1" /></p>
<p>Repeat this step and create different color overlapping layers. Try to use bright colors such as yellow, megenta and cyan. <em>Tips:</em> you can control the dissolve level by adjusting the layer Opacity.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/dusty2.jpg" alt="Dusty effect 2" /></p>
<h3><em>Technique 3:</em> Rainbow</h3>
<p class="image right"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/rainbow-effect.jpg" alt="Rainbow effect" /></p>
<p>If you ever wondered how I did the rainbow effect on my Phoenix illustration (currently displaying on <a href="http://www.ndesign-studio.com">N.Design Studio</a>). It is done by a Photoshop plugin, Polar Coordinates.</p>
<p>Create a new square dimension file (ie. 800 x 800px). Make a spectrum gradation in the middle of the document using the Gradient tool with the default &#8220;Spectrum&#8221; preset. Go to  Filter &gt; Distort &gt; Polar Coordinates. There you go, a perfect circle spectrum!</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/rainbow1.jpg" alt="Rainbow 1" /></p>
<p>Now, you have to blur the sharp edge. Go to Filter &gt; Blur &gt; Gaussian Blur, apply 5 to 10px radius, depending on the size of your document. Bigger document size will require more blur.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/rainbow2.jpg" alt="Rainbow 2" /></p>
<p>If you only to show partial of the rainbow, you can use the layer mask to hide the unwanted area. In the Layer palette, click on the &#8220;Add layer mask&#8221; icon. Use Gradient tool, select the &#8220;black to transparent&#8221; swatch, drag from left to right to mask out the unwanted area.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/rainbow3.jpg" alt="Rainbow 3" /></p>
<h3><em>Technique 4:</em> Glowing Lights - Background</h3>
<p>This is the quickiest and most easiest way to create a colorful light glowing background for your vector work.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/glowing-lights.jpg" alt="Glowing Lights" /></p>
<p>First fill the layer with any dark gradient you desire. Use the Radial Gradient tool and start making soft (transparent) glows on separate layers. This effect works best with cyan, magenta, and purplish colors.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/glowing-bg1.jpg" alt="Glowing background 1" /></p>
<p>Experiment with the blending modes and drag the layers around (you will get unexpected results): Overlay, Color, Multiply, Screen, and Color Dodge.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/glowing-bg2.jpg" alt="Glowing background 2" /></p>
<h3><em>Technique 5:</em> Particles</h3>
<p class="image right"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/particles.jpg" alt="Particles" /></p>
<h4>Particle Tail</h4>
<p>Here is a technique on how to create a tail of particles as seen in my <a href="http://www.ndesign-studio.com/portfolio/graphic/flow/">Flow</a> artwork. This technique is also commonly used in the fairy tale books/movies (you know, the typical magic wand effects).</p>
<p>Select the Pen tool, and draw an opening path. Select the Brush tool, set any brush size you want (ie. Brush size 3px). In the Brush panel, turn on Scattering and Shape Dynamics (you can play around with these settings to get different results).</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/particle-tail1.jpg" alt="Particle Tail 1" /></p>
<p> In the Paths palette, right-click on the path layer and select &#8220;Stroke Path&#8221;. It will fill the stroke with your active brush setting.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/particle-tail2.jpg" alt="Particle Tail 2" /></p>
<h4>Tablet Drawing</h4>
<p>Of course you can manually create the particle effect by brushing with various brush sizes. If you have a tablet, this will be fun. In the Brush panel, turn on Shape Dynamics, Scattering, or any other controls to Pen Pressure and experiment the results. If you don’t have a tablet, have fun clicking and dragging.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/particle-tail3.jpg" alt="Particle Tail 3" /></p>
<h3><em>Technique 6:</em> Color Dodge</h3>
<p class="image right"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/color-dodge.jpg" alt="Color dodge" /></p>
<p>Vector artworks usually look very flat, by color dodging, you can bring up the contrast and create a focus point.</p>
<p>Paste your vector artwork in a new layer, use the Eyedropper tool and pick a bright color from the original image. Set your Brush mode to Color Dodge and brush Opacity 5 to 10%. Gentling click on the area where you want to be dodged. Be easy and try to over-dodge the image.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/color-dodge1.jpg" alt="Color dodge 1" /></p>
<h3><em>Technique 7:</em> Blurred and Darkened.</h3>
<p>As mentioned earler, vector artwork is usually very flat. You can add more depth to the image by blurring and darkening the background objects. Examples can be found in my <a href="http://www.ndesign-studio.com/portfolio/graphic/flow/">Flow</a> illustration. Notice the floral patterns in the background are blurred and darkened?</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/blur-darken.jpg" alt="Blurred and darkened" /></p>
<p>Just duplicate the foreground objects and apply 3 to 5px Gaussian Blur.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/blurred.jpg" alt="Blurred" /></p>
<h3><em>Technique 8:</em> Watercolor</h3>
<p>As seen on this site, watercolor texture and vector can mix very well together. Here is how I did the watercolor effects.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/watercolor1.jpg" alt="Watercolor 1" /></p>
<p>Choose any pastel colors, such as pink, green, purple, orange, etc. Select the Pencil tool, set the brush size to about 100px, Opacity 10%, and randomly draw on the layer.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/watercolor2.jpg" alt="Watercolor 2" /></p>
<p>Repeat this step for different colors. This technique is also posted in the previous tutorial, <a href="http://www.webdesignerwall.com/tutorials/design-watercolor-effect-menu/">Watercolor Effect Menu</a>.</p>
<h3><em>Technique 9:</em> Vintage</h3>
<p>Here is a technique on how to create vintage effect to give more texture to your vector work. Although I have never used this technique in my illustration work, but I have seen it a lot. So, here is it.</p>
<p class="image"><img src="http://www.webdesignerwall.com/wp-content/uploads/2007/11/vintage1.jpg" alt="Vintage 2" /></p>
<p>Paste your vector artwork in Photoshop. Select the Erase tool, set the mode to Pencil, select one of the grunge/splatter brushes, and gentling erase partial of the layer.</p>
<p><em>Credits</em>: The brush sets used here are <a href="http://www.bittbox.com/freebies/free-hi-res-splatter-photoshop-brushes/">splatter</a> and <a href="http://www.bittbox.com/freebies/free-hi-res-watercolor-photoshop-brushes-set-ii/">watercolor</a>, from <a href="http://www.bittbox.com">Bittbox</a>. The icons are from my free <a href="http://www.ndesign-studio.com/resources/christmas-holiday-icons/">Christmas Holiday Icon Pack</a>.</p>
<h3>See more</h3>
<p>You can browse my <a href="http://www.ndesign-studio.com/portfolio/">design portfolio</a> to see more work by me. Some of my works are available for download as <a href="http://www.ndesign-studio.com/resources/wallpapers/">desktop wallpapers</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/vector-polishing-techniques/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fixing Backlight Photos</title>
		<link>http://www.totaltuts.org/2007/12/25/fixing-backlight-photos/</link>
		<comments>http://www.totaltuts.org/2007/12/25/fixing-backlight-photos/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 14:44:54 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/fixing-backlight-photos/</guid>
		<description><![CDATA[Learn how to use the shadow/hightlight tool with this quick fix for photos with a rear light source.]]></description>
			<content:encoded><![CDATA[<p>Here is an example of a backlight photo:</p>
<p class="tutimg">&nbsp;</p>
<p>          <img src="/images/adjust_backlight_01.jpg" alt="adjust_backlight_01 (18K)" height="422" width="563" /></p>
<p>Now, let&#8217;s start.</p>
<ol>
<li>Press (Ctrl+J) to duplicate the background layer so<br />
you can delete the new layer and start all over again<br />
if anything goes wrong.</li>
<li>With the new layer selected, click Image &gt;<br />
Adjustments &gt; Shadow/Highlight&#8230;</p>
<p class="tutimg">               <img src="/images/adjust_backlight_02.jpg" alt="adjust_backlight_02 (31K)" height="470" width="575" /></p>
</li>
<li>The default settings of the Photoshop<br />
Shadow/Highlight tool will make the image look better<br />
but you can play with settings to get much better<br />
results. The shadows sliders will affect only the<br />
shadows in the image while the highlights sliders will<br />
only affect the highlights areas which makes the<br />
Shadow/Highlight tool perfect for this setuation.</p>
<p class="tutimg">               <img src="/images/adjust_backlight_03.jpg" alt="adjust_backlight_03 (35K)" height="521" width="576" /></p>
</li>
</ol>
<p><strong>Before:</strong></p>
<p class="tutimg">&nbsp;</p>
<p>          <img src="/images/adjust_backlight_01.jpg" alt="adjust_backlight_01 (18K)" height="422" width="563" /></p>
<p><strong>After:</strong></p>
<p class="tutimg">           <img src="/images/adjust_backlight_04.jpg" alt="adjust_backlight_04 (23K)" height="422" width="563" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/fixing-backlight-photos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Create a Realistic Torn Paper Effect in Photoshop</title>
		<link>http://www.totaltuts.org/2007/12/25/create-a-realistic-torn-paper-effect-in-photoshop/</link>
		<comments>http://www.totaltuts.org/2007/12/25/create-a-realistic-torn-paper-effect-in-photoshop/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 14:33:45 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/create-a-realistic-torn-paper-effect-in-photoshop/</guid>
		<description><![CDATA[Create realistic torn paper!]]></description>
			<content:encoded><![CDATA[<p>Torn paper is one of the key elements to achieving the distressed / collage look.  This tutorial covers a few simple steps in Adobe Photoshop to create a realistic looking torn paper effect taking you on your way to <a href="http://www.snap2objects.com/2007/11/20/how-to-destroy-the-web-20-look/">Destroying the Web 2.0 Look</a>!</p>
<p><span id="more-560"></span></p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/17.gif" title="Photoshop Torn Paper Effect" alt="Photoshop Torn Paper Effect" /></p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/11.gif" alt="11.gif" /></p>
<p>Start with your blank document in Adobe Photoshop, use the Lasso Tool freehand to create the outline of the torn edge and continue the selection across the lower half of the document.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/22.gif" alt="22.gif" /></p>
<p>Select an appropriate colour for your paper and fill the selection on a new layer.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/31.gif" alt="31.gif" /></p>
<p>With the Lasso Tool still selected, Right Click (CMD-Click) on the mask and select Make Work Path from the menu.  Change the tolerance to 1px to keep the path close to the original mask.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/41.gif" alt="41.gif" /></p>
<p>Select a brush shown above from the Brush Tool Menu, depending on the size of your document you may require a larger/smaller brush.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/51.gif" alt="51.gif" /></p>
<p>Head over to the Brush Options window, change the Shape Dynamics settings as show to create a fibrous stroke.  For more information on the Brush Options window take a look at my previous <a href="http://www.blog.spoongraphics.co.uk/tutorials/photoshop-tip-rotate-brush-between-use">Photoshop Brush Tip</a>.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/61.gif" alt="61.gif" /></p>
<p>Back with the Pen Tool or Path Selection Tool Right Click (CMD-Click) the path and select Stroke Path from the menu.  Ensure the Tool is selected as Brush from the drop down and Simulate Pressure is off.  Repeat this again if necessary to produce a realistic amount of stray fibres from the edge of the paper.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/7.gif" alt="7.gif" /></p>
<p>Paper is often made up of several layers which can become exposed when torn, to make the torn paper effect realistic create a another freehand selection using the Lasso Tool.</p>
<p>Fill this selection in a much lighter tint than the first colour on a new layer.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/8.gif" alt="8.gif" /></p>
<p>Make this the new Work Path by Right Clicking (CMD-Click) with the Lasso Tool.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/9.gif" alt="9.gif" /></p>
<p>Your brush settings should still be in place and appropriate colour selected, go ahead and Stroke the Path using the Brush option to produce more fibrous particles.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/10.gif" alt="10.gif" /></p>
<p>This produces the basics of the torn paper, but paper is more than jus a block of flat colour.  To make it more realistic we need subtle texture and creases.</p>
<p><a href="http://www.sxc.hu/photo/912287"><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/111.gif" alt="111.gif" /></a></p>
<p>Download a <a href="http://www.sxc.hu/photo/912287">Paper Texture</a> from a stock photography website, the one I have found is free from <a href="http://www.sxc.hu/photo/912287">Stock XChange</a>.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/12.gif" alt="12.gif" /></p>
<p>Paste the texture into you document and desaturate (Image &gt; Adjustments &gt; Desaturate) to remove the brown colouring.</p>
<p>Change the blending mode to Multiply to render the light areas of the image transparent.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/13.gif" alt="13.gif" /></p>
<p>The texture is way too overpowering so adjust the Brightness and Contrast (Image &gt; Adjustments &gt; Brightness/Contrast) to tone down the effect.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/14.gif" alt="14.gif" /></p>
<p>Move the layer around to find an interesting section with plenty of creases and texture.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/15.gif" alt="15.gif" /></p>
<p>Delete the unwanted areas from the texture by selecting your lighter coloured paper layer, go to Select &gt; Load Selection.</p>
<p>Inverse the selection (CTRL/CMD + Shift + I) and delete the selection from the texture layer.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/16.gif" alt="16.gif" /></p>
<p>Merge your layers and add the new paper texture to your designs, notice the tiny fibrous edges and subtle texture up close which together give effect a realistic paper look.</p>
<p><img src="http://www.blog.spoongraphics.co.uk/wp-content/uploads/2007/12/17.gif" title="Photoshop Torn Paper Effect" alt="Photoshop Torn Paper Effect" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/create-a-realistic-torn-paper-effect-in-photoshop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Electrifying Energy Beams</title>
		<link>http://www.totaltuts.org/2007/12/25/electrifying-energy-beams/</link>
		<comments>http://www.totaltuts.org/2007/12/25/electrifying-energy-beams/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 14:21:12 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/electrifying-energy-beams/</guid>
		<description><![CDATA[Create a beam of glowing light.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a great effect that will bring some energy to your subject. We&#8217;ll be wrapping this singer&#8217;s arm with a glowing beam of light, adding sparkles, and adjusting the colors to make it all seem magical.</p>
<p><center><img src="/images/tutorial8/magicstrokes.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center>Firstly, create a new layer, then grab your Pen Tool (P) and draw out a spiraling path, as if you have a snake wrapped around the arm. <center><img src="/images/tutorial8/second.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center> <center><img src="/images/c.gif" height="15" width="1" /></center></p>
<table border="0" cellpadding="0" cellspacing="10" width="100%">
<tr>
<td>Then select the Brush Tool (B) and set your diameter to 7px, with the Opacity and Flow at 100%, and your foreground color set to white. With your path still on the artwork, go back to the Pen Tool, right click on the canvas, and choose &#8220;Stroke Path.&#8221; A menu will appear with the Brush set as the Tool. Check &#8220;Simulate Pressure&#8221; and press OK. This will make the beginning and end of your stroke thinner.</td>
<td><img src="/images/tutorial8/brush7px.gif" style="border: 8px solid #efede7" /></td>
</tr>
</table>
<p><center><img src="/images/c.gif" height="15" width="1" /></center>Now you need to delete the parts you want hidden behind the arm. With your stroke layer selected, choose &#8220;Add layer mask&#8221; at the bottom of the Layers Palette. Use the Polygonal Lasso Tool (L) to select areas of the arm you want in front of the stroke &#8212; use your eye and imagine how this path will wrap around the arm. Make sure your mask is active by clicking on it, and fill these selected areas with black. They should now be cut out, appearing as if they&#8217;re behind the arm. <center><img src="/images/tutorial8/third.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center> <center><img src="/images/tutorial8/fourth.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center>Right click on your stroke layer and choose Blending Options. A Layer Style menu will appear, where you&#8217;ll be adding an Inner and Outer Glow to the stroke, making the edges of it glow with a blue hue. Use the settings below: <center><img src="/images/tutorial8/outerglow.gif" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center> <center><img src="/images/tutorial8/innerglow.gif" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center>Make a copy of your stroke layer and right click on the Layer Effects icon. Choose &#8220;Clear Layer Style&#8221; &#8212; we simply want to blur this layer (about 6 pixels) to add another layer of glow. Everything&#8217;s looking nice and illuminated here, so let�s add some sparkles. With your Brush Tool, add some quick spots around your glowing path with varying small brush sizes (3 - 5px). Make as many as you want here, as you&#8217;re always free Erase undesired sparkles. <center><img src="/images/tutorial8/sparkles.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center>We&#8217;re now going to make a secondary stroke to create another level of motion. Use the Pen Tool to go over your original path, but make it a bit different and overlap parts. Select a smaller diameter brush this time with a 50% opacity, and stroke the path as before. <center><img src="/images/tutorial8/another.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center>Our energy beam is nearly there. To make the effect more dramatic, you can adjust the overall hue of your photo. Create a new Curves adjustment layer, and tweak the colors to get a vibrant blue atmosphere. Download the Curves preset below to load it in your document. After your colors are locked in, use the Dodge Tool (O) (with a diameter of 35 pixels and the exposure set to 25%) to brush in some highlights underneath your beam, directly on the background photo. This makes it appear as if your beam is casting light on to the arm. <center></p>
<table style="margin-top: 15px; margin-bottom: 15px; width: 400px" border="0" cellpadding="20" cellspacing="0" width="400">
<tr>
<td style="padding: 10px; color: #453a2e; font-size: 13px; width: 400px" bgcolor="#f6f6ec"><center><strong>Download</strong> <a href="/images/tutorial8/blue.acv" target="_new" style="color: #453a2e">blue.acv</a></center></td>
</tr>
</table>
<p></center>For the last part of this effect, we&#8217;ll add one more layer of shimmer. Hold down Ctrl and click on your main stroked path in the layers palette &#8212; your path should now be selected. Go to Select › Modify › and Expand the selection by 7px, then feather it by 10px. <center><img src="/images/tutorial8/feather.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center>Now select your background photo layer and apply a Plastic Wrap filter, found in your Artistic filters. This will add some wispy lines around your path. Set the Highlight Strength to 20, the Detail to 6, and the Smoothness to 8. Finally, lightly Gaussian Blur your background layer with the feathered selection still active. <center><img src="/images/tutorial8/magicstrokes.jpg" style="border: 8px solid #efede7; margin-top: 15px; margin-bottom: 15px" /></center> <center><img src="/images/c.gif" height="15" width="1" /></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/electrifying-energy-beams/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Make a Electric related website banner image logo idea</title>
		<link>http://www.totaltuts.org/2007/12/25/make-a-electric-related-website-banner-image-logo-idea/</link>
		<comments>http://www.totaltuts.org/2007/12/25/make-a-electric-related-website-banner-image-logo-idea/#comments</comments>
		<pubDate>Tue, 25 Dec 2007 13:34:15 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
		
		<category><![CDATA[Photoshop]]></category>

		<category><![CDATA[Web graphics]]></category>

		<guid isPermaLink="false">http://www.totaltuts.org/2007/12/25/make-a-electric-related-website-banner-image-logo-idea/</guid>
		<description><![CDATA[Electric related website banner image logo idea using photoshop tools and technique.]]></description>
			<content:encoded><![CDATA[<p>Here I will tell you how to make a Electric related website banner image logo idea using photoshop tools and technique.</p>
<p>[1] Take a new file of 400 pixels,400 pixels, of resolution 72 dpi in the RGB mode.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea1.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea1-thumb.gif" alt="Electric-related-website-banner-image-logo-idea1" height="325" width="414" /></a></p>
<p>[2] Take the Elliptical Marquee Tool.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea2.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea2-thumb.gif" alt="Electric-related-website-banner-image-logo-idea2" height="42" width="188" /></a></p>
<p>[3] Now set the Foreground Color see in the next image.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea4.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea4-thumb.gif" alt="Electric-related-website-banner-image-logo-idea4" height="302" width="213" /></a></p>
<p>[4] Now create a circle then go to Select&gt;Feather Selection use these values.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea5.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea5-thumb.gif" alt="Electric-related-website-banner-image-logo-idea5" height="94" width="259" /></a></p>
<p>[5] Now fill the selection with help of Alt+Backspace.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea7.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea7-thumb.gif" alt="Electric-related-website-banner-image-logo-idea7" height="325" width="342" /></a></p>
<p>[6] Then set the Opacity of this layer.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea8.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea8-thumb.gif" alt="Electric-related-website-banner-image-logo-idea8" height="67" width="246" /></a></p>
<p>[7] Your image should be look like this.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea9.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea9-thumb.gif" alt="Electric-related-website-banner-image-logo-idea9" height="309" width="325" /></a></p>
<p>[8] Now create another Circle with the help of Elliptical Marquee Tool, then fill the selection with Red color.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea10.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea10-thumb.gif" alt="Electric-related-website-banner-image-logo-idea10" height="309" width="310" /></a></p>
<p>[9] Now set the Foreground Color see in the next image.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea11.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea11-thumb.gif" alt="Electric-related-website-banner-image-logo-idea11" height="304" width="210" /></a></p>
<p>[10] Now create another Circle with the help of Elliptical Marquee Tool and fill the color.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea12.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea12-thumb.gif" alt="Electric-related-website-banner-image-logo-idea12" height="313" width="297" /></a></p>
<p>[11] Then go to Blending Option use the following settings.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea13.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea13-thumb.gif" alt="Electric-related-website-banner-image-logo-idea13" height="183" width="281" /></a></p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea14.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea14-thumb.gif" alt="Electric-related-website-banner-image-logo-idea14" height="161" width="401" /></a></p>
<p>[12] Your image should be look like this.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea15.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea15-thumb.gif" alt="Electric-related-website-banner-image-logo-idea15" height="321" width="330" /></a></p>
<p>[13] Now hold Cntl+Click the Previous Layer, then take the Rectangular Marquee Tool use the following settings.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea16.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea16-thumb.gif" alt="Electric-related-website-banner-image-logo-idea16" height="33" width="144" /></a></p>
<p>[14] Create a new shape over the circle shape see in the next image.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea17.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea17-thumb.gif" alt="Electric-related-website-banner-image-logo-idea17" height="314" width="362" /></a></p>
<p>[15] Your image should be look like this.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea18.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea18-thumb.gif" alt="Electric-related-website-banner-image-logo-idea18" height="299" width="313" /></a></p>
<p>[16] Then fill the selection with White color.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea19.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea19-thumb.gif" alt="Electric-related-website-banner-image-logo-idea19" height="273" width="301" /></a></p>
<p>[17] Now set the Opacity see in the next image.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea20.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea20-thumb.gif" alt="Electric-related-website-banner-image-logo-idea20" height="70" width="250" /></a></p>
<p>[18] Your image should be look like this.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea21.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea21-thumb.gif" alt="Electric-related-website-banner-image-logo-idea21" height="278" width="306" /></a></p>
<p>[19] Now create a new shape with the help of Pen Tool.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea22.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea22-thumb.gif" alt="Electric-related-website-banner-image-logo-idea22" height="317" width="326" /></a></p>
<p>[20] And then take the Gradient Tool use these settings.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea23.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea23-thumb.gif" alt="Electric-related-website-banner-image-logo-idea23" height="37" width="262" /></a></p>
<p>[21] Fill the selection with the help of Gradient Tool.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea24.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea24-thumb.gif" alt="Electric-related-website-banner-image-logo-idea24" height="303" width="321" /></a></p>
<p>[22] Now create a new shape with the help of Pen Tool.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea25.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea25-thumb.gif" alt="Electric-related-website-banner-image-logo-idea25" height="300" width="321" /></a></p>
<p>[23] Create a new layer make the selection and fill with White color.</p>
<p>[24] Your final image is ready.</p>
<p><a href="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea26.gif"><img src="http://www.funphotoart.com/wp-content/uploads/2007/12/electric-related-website-banner-image-logo-idea26-thumb.gif" alt="Electric-related-website-banner-image-logo-idea26" height="297" width="321" /></a></p>
<p>Make a  Electric related website banner image logo idea,Free Photoshop Website Templates, Free Photoshop Web Layouts,Photoshop Web Template - Web Site Design Tutorial …</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totaltuts.org/2007/12/25/make-a-electric-related-website-banner-image-logo-idea/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
