<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Gsolutions Blog</title>
	<atom:link href="http://blog.gsol.co.za/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gsol.co.za</link>
	<description>Complete Corporate IT Solutions</description>
	<lastBuildDate>Tue, 23 Nov 2010 12:05:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to enable remote desktop via ADSL with a Netgear router</title>
		<link>http://blog.gsol.co.za/2010/11/how-to-enable-remote-desktop-via-adsl-with-a-netgear-router/</link>
		<comments>http://blog.gsol.co.za/2010/11/how-to-enable-remote-desktop-via-adsl-with-a-netgear-router/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 11:57:40 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Gsolutions]]></category>

		<guid isPermaLink="false">http://blog.gsol.co.za/?p=364</guid>
		<description><![CDATA[1. Log into the router. 2. Select &#8221;Services&#8221;&#8217; on the left hand side. 3. Under Services, click on the &#8221;Add Custom Service&#8221; button. 4. Fill in the details as depicted below, click &#8221;Apply&#8221; and then &#8221;Select&#8221;. 5. Under the Inbound Services, click the &#8221;Add&#8221; button. 6. Complete the form as below. The Send to Lan [...]]]></description>
			<content:encoded><![CDATA[<p>1. Log into the router.</p>
<p>2. Select &#8221;Services&#8221;&#8217; on the left hand side.</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/pic-1.jpg"></a><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-1.jpg"><img class="aligncenter size-full wp-image-368" title="NEW PIC 1" src="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-1.jpg" alt="" width="1376" height="406" /></a><br />
3. Under Services, click on the &#8221;Add Custom Service&#8221; button.</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-NEW-PIC-3.jpg"><img class="aligncenter size-full wp-image-377" title="NEW NEW PIC 3" src="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-NEW-PIC-3.jpg" alt="" width="1376" height="406" /></a><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/pic-2.png"><br />
</a></p>
<p>4. Fill in the details as depicted below, click &#8221;Apply&#8221; and then &#8221;Select&#8221;.</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/Pic-3.png"></a><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-3.png"><img class="aligncenter size-full wp-image-370" title="NEW PIC 3" src="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-3.png" alt="" width="1376" height="406" /></a><br />
5. Under the Inbound Services, click the &#8221;Add&#8221; button.</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-4.jpg"><img class="aligncenter size-full wp-image-371" title="NEW PIC 4" src="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-4.jpg" alt="" width="1376" height="406" /></a>6. Complete the form as below. The Send to Lan Server is the interal IP of the machine you wish to remote control. Click &#8221;Apply&#8221;.</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-5.png"><img class="aligncenter size-full wp-image-372" title="NEW PIC 5" src="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-5.png" alt="" width="1376" height="406" /></a>7. Select Dynamic DNS and fill in your DynDNS details (or similar provider).</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-6.jpg"><img class="aligncenter size-full wp-image-373" title="NEW PIC 6" src="http://blog.gsol.co.za/wp-content/uploads/2010/11/NEW-PIC-6.jpg" alt="" width="1376" height="406" /></a>You can now connect via Windows Remote Desktop to the selected machine by using Dynamic DNS host name.</p>
<p>Please ensure that you have enabled Remote Desktop on the workstation / server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gsol.co.za/2010/11/how-to-enable-remote-desktop-via-adsl-with-a-netgear-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validating and sanitizing URLs, Emails, and other inputs with PHP&#8217;s filter_* functions</title>
		<link>http://blog.gsol.co.za/2010/11/validating-and-sanitizing-urls-emails-and-other-inputs-with-phps-filter_-functions/</link>
		<comments>http://blog.gsol.co.za/2010/11/validating-and-sanitizing-urls-emails-and-other-inputs-with-phps-filter_-functions/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 07:28:49 +0000</pubDate>
		<dc:creator>Willem</dc:creator>
				<category><![CDATA[Gdevelop]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[validate]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://blog.gsol.co.za/?p=359</guid>
		<description><![CDATA[PHP has several built-in filter_* functions that can assist with validating and sanitizing email addresses, URLs, strings, integers, float values, etc.]]></description>
			<content:encoded><![CDATA[<p><a title="Wikipedia - PHP" rel="nofollow" href="http://en.wikipedia.org/wiki/PHP" target="_blank">PHP</a> has several built-in <strong>filter_*</strong> functions that can assist with validating and sanitizing <strong>email addresses</strong>, <strong>URLs</strong>, <strong>strings</strong>, <strong>integers</strong>, <strong>float</strong> values, etc.</p>
<p>Please note that this these functions only validate the <strong>structure</strong> of <strong>email address</strong> or <strong>URL</strong> strings, they don&#8217;t check if the associated <strong>domains</strong> actually exist. To obtain a list of all available filters on your system, use the results from the <a title="PHP - filter_list() function" rel="nofollow" href="http://www.php.net/filter_list" target="_blank">filter_list()</a> function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">filter_list</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$filter</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$filter</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The code above will result in output similar to:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">int
boolean
float
validate_regexp
validate_url
validate_email
validate_ip
string
stripped
encoded
special_chars
unsafe_raw
email
url
number_int
number_float
magic_quotes
callback</pre></div></div>

<p><span id="more-359"></span></p>
<h3><strong>PHP</strong>&#8216;s <strong>filter_*</strong> functions provide three basic filtering methods:</h3>
<p><!--more--></p>
<p><strong>Validate</strong> &#8211; Check that data is in the exact format that it should be (<em>e.g. <strong>FILTER_VALIDATE_EMAIL</strong></em>).</p>
<p><strong>Sanitize</strong> &#8211; Clean the data by removing, escaping or encoding invalid characters (<em>e.g. <strong>FILTER_SANITIZE_EMAIL</strong></em>).</p>
<p><strong>Flags</strong> &#8211; Set options for all or specific filters (<em>e.g. <strong>FILTER_FLAG_ALLOW_HEX</strong> and / or <strong>min_range</strong>, <strong>max_range</strong>, etc</em>).</p>
<h3>Usage examples:</h3>
<p>To <strong>validate</strong> an <strong>email address</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$email_address</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'willem@geekology..co....za'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#40;</span><span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$email_address</span><span style="color: #339933;">,</span> FILTER_VALIDATE_EMAIL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    ? <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Valid email address&quot;</span>
    <span style="color: #339933;">:</span> <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Invalid email address&quot;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>To <strong>sanitize</strong> an <strong>email address</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$email_address</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'willem@geekology.co. za'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">echo</span> <span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$email_address</span><span style="color: #339933;">,</span> FILTER_SANITIZE_EMAIL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>To <strong>validate</strong> a <strong>URL</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.geekology..co....za'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#40;</span><span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> FILTER_VALIDATE_URL<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    ? <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Valid URL&quot;</span>
    <span style="color: #339933;">:</span> <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Invalid URL&quot;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>To <strong>sanitize</strong> a <strong>URL</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.geekology.co. za'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">echo</span> <span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> FILTER_SANITIZE_URL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>To <strong>sanitize</strong> a <strong>string</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$string</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;hfgsd&quot;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">128</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;535&quot;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">echo</span> <span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #339933;">,</span> FILTER_SANITIZE_STRING<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>To <strong>validate</strong> an <strong>integer</strong> within a <strong>specified range</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$integer</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">132</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #009900;">&#40;</span><span style="color: #990000;">filter_var</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$integer</span><span style="color: #339933;">,</span> FILTER_VALIDATE_INT<span style="color: #339933;">,</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'options'</span><span style="color: #339933;">=&gt;</span>
      <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'min_range'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span>
            <span style="color: #0000ff;">'max_range'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span>
      <span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    ? <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Valid integer&quot;</span>
    <span style="color: #339933;">:</span> <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Invalid integer&quot;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$result</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>To <strong>validate</strong> an <strong>array of values</strong>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
  <span style="color: #000088;">$values</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'willem van zyl'</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'age'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">25</span><span style="color: #339933;">,</span>
                  <span style="color: #0000ff;">'email'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'willem@geekology.co. za'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$filters</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'filter'</span><span style="color: #339933;">=&gt;</span>FILTER_CALLBACK<span style="color: #339933;">,</span>
                                 <span style="color: #0000ff;">'options'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'ucwords'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">'age'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'filter'</span><span style="color: #339933;">=&gt;</span>FILTER_VALIDATE_INT<span style="color: #339933;">,</span>
                                <span style="color: #0000ff;">'options'</span><span style="color: #339933;">=&gt;</span>array<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'min_range'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'max_range'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">120</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
                   <span style="color: #0000ff;">'email'</span><span style="color: #339933;">=&gt;</span>FILTER_SANITIZE_EMAIL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filter_var_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$values</span><span style="color: #339933;">,</span> <span style="color: #000088;">$filters</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>More information on <a title="Wikipedia - PHP" rel="nofollow" href="http://en.wikipedia.org/wiki/PHP" target="_blank">PHP</a>&#8216;s <a title="PHP - filter_var() function" rel="nofollow" href="http://www.php.net/filter_var" target="_blank">filter_* functions</a> and their <a title="PHP - filter_* function filters &amp; flags" rel="nofollow" href="http://us3.php.net/manual/hu/ref.filter.php" target="_blank">filters / flags</a> can be found <a title="PHP - filter_* function filters &amp; flags" rel="nofollow" href="http://us3.php.net/manual/hu/ref.filter.php" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gsol.co.za/2010/11/validating-and-sanitizing-urls-emails-and-other-inputs-with-phps-filter_-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to &#8221;Blacklist&#8221; or &#8221;Whitelist&#8221; an email address in Cpanel</title>
		<link>http://blog.gsol.co.za/2010/11/how-to-blacklist-or-whitelist-an-email-address-in-cpanel-2/</link>
		<comments>http://blog.gsol.co.za/2010/11/how-to-blacklist-or-whitelist-an-email-address-in-cpanel-2/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 11:52:08 +0000</pubDate>
		<dc:creator>JP</dc:creator>
				<category><![CDATA[Gsolutions]]></category>

		<guid isPermaLink="false">http://blog.gsol.co.za/?p=350</guid>
		<description><![CDATA[Cpanel uses a service called SpamAssassin to help minimise the amount of spam that email accounts hosted in Cpanel receive. Sometimes SpamAssassin will not always correctly identify what is spam or not. Blacklisting an email address or domain means that no email from the relevant domain will be accepted. Whitelisting an address will do the [...]]]></description>
			<content:encoded><![CDATA[<p>Cpanel uses a service called SpamAssassin to help minimise the amount of spam that email accounts hosted in Cpanel receive. Sometimes SpamAssassin will not always correctly identify what is spam or not. Blacklisting an email address or domain means that no email from the relevant domain will be accepted. Whitelisting an address will do the reverse and all mail from the address or domain will be accepted.</p>
<p><span style="text-decoration: underline;">Follow the steps below to setup &#8221;Blacklisting&#8221; or &#8221;Whitelisting&#8221; in Cpanel:</span></p>
<p>1.  Open your web browser (Internet Explorer, Firefox or Chrome).</p>
<p>2.  In your address bar type: http://www.(yourdomain).co.za/cpanel</p>
<p>3.  Enter your username and password.</p>
<p>4.  On the home page, under the &#8221;Mail&#8221; tab, select the &#8221;SpamAssasin&#8221; icon.</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/10/image-1.jpg"><img class="aligncenter size-full wp-image-336" title="image 1" src="http://blog.gsol.co.za/wp-content/uploads/2010/10/image-1.jpg" alt="" width="473" height="425" /></a></p>
<p>5.  Click on the &#8221;Enable SpamAssassin&#8221; icon.</p>
<p>6.  Click on the &#8221;Configure SpamAssassin&#8221; icon.</p>
<p>7.  You may now &#8221;Blacklist&#8221; or &#8221;Whitelist&#8221; specific email addresses.</p>
<p>8.  Enter all email addresses that you are wanting to &#8221;Blacklist&#8221; or &#8221;Whitelist&#8221;.</p>
<p>9.  Click on &#8221;save&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gsol.co.za/2010/11/how-to-blacklist-or-whitelist-an-email-address-in-cpanel-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using phpThumb to auto-generate thumbnail images</title>
		<link>http://blog.gsol.co.za/2010/10/using-phpthumb-to-auto-generate-thumbnail-images/</link>
		<comments>http://blog.gsol.co.za/2010/10/using-phpthumb-to-auto-generate-thumbnail-images/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 10:02:26 +0000</pubDate>
		<dc:creator>Rudi</dc:creator>
				<category><![CDATA[Gdevelop]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpthumb]]></category>
		<category><![CDATA[thumbnail]]></category>

		<guid isPermaLink="false">http://blog.gsol.co.za/?p=314</guid>
		<description><![CDATA[phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly.]]></description>
			<content:encoded><![CDATA[<h3>What is phpThumb</h3>
<blockquote><p>&#8220;phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD v2.0+ is available, otherwise paletted-color and nearest-neighbour resizing is used. ImageMagick is used wherever possible for speed. Basic functionality is available even if GD functions are not installed (as long as ImageMagick is installed).&#8221; &#8211; http://phpthumb.sourceforge.net</p></blockquote>
<p><b>phpThumb allows for the following functionality:</b></p>
<ul>
<li>A watermark image or text can be applied over the thumbnail in one of 10 positions or tiled.</li>
<li>A border or frame can be applied.</li>
<li>Thumbnails can be a fixed dimension regardless of source aspect ratio and background filled with configurable color. Border corners can optionally be rounded (independant horizontal &#038; vertical radius).</li>
<li>Unsharp Mask sharpening.</li>
<li>Alpha channel mask from mask file.</li>
<li>Auto Contrast / Levels.</li>
<li>Bevel edge.</li>
<li>Add Blur.</li>
<li>Change Brightness.</li>
<li>Colorize.</li>
<li>Alter Contrast.</li>
<li>Drop shadow.</li>
<li>Edge Detect</li>
<li>Flip Horizontal / Vertical.</li>
<li>Change Gamma</li>
<li>Grayscale Images.</li>
<li>Mean Removal	</li>
<li>Negative Color</li>
<li>Reduce Color Depth</li>
<li>Rounded Corners</li>
<li>Saturation</li>
<li>Sepia</li>
<li>Smooth</li>
<li>Threshold</li>
<li>White Balance</li>
</ul>
<p><span id="more-314"></span></p>
<p>There is a nice demo site where you can see what can be done with phpThumb <a href="http://phpthumb.sourceforge.net/demo/demo/phpThumb.demo.demo.php" target="_blank">here</a>.</p>
<h3>Using phpThumb to create dynamic thumbnail images</h3>
<p>Lets say we are building a portfolio website for a photographer and our client wants the ability for new uploaded photos to be automatically displayed on the front page. The client wants visitors to be able to click on the image thumbnail and view the original image in high quality, but he does not want to create seperate thumbnail images for every photo he uploads.</p>
<h4>Step 1: Installing phpThumb</h4>
<p>Installing is a bit of a strong word, pretty much all you need is to do is go to <a href="http://phpthumb.sourceforge.net/" target="_blank">http://phpthumb.sourceforge.net/</a>, download the phpThumb library, extract it, and move it to a &#8220;phpThumb&#8221; folder in your site&#8217;s root folder.</p>
<h4>Step 2: Setting up the htaccess file</h4>
<p>Create a sub folder in the images directory, for this exercise the folder we will be creating is called &#8220;gallery&#8221;.</p>
<p>We now have a <em>www.yoursite.com/phpthumb</em> and a <em>www.yoursite.com/images/gallery</em> folder on the server; the &#8220;/phpthumb&#8221; directory contains your phpThumb library and the &#8220;/images/gallery&#8221; folder contains a bunch of images we want to have thumbnails generated for.</p>
<p>Next, we update the htaccess file to allow for &#8220;clean&#8221; URLs. Open the .htaccess file in your site root in an editor and add the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_rewrite.c<span style="color: #000000; font-weight: bold;">&gt;</span>
  <span style="color: #666666; font-style: italic;"># turn mod_rewrite on:</span>
  RewriteEngine On
  <span style="color: #666666; font-style: italic;"># create an url path for thumbnails with a width of 200 pixels</span>
  RewriteRule ^images<span style="color: #000000; font-weight: bold;">/</span>gallery<span style="color: #000000; font-weight: bold;">/</span>thumbs<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>.<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>$ <span style="color: #000000; font-weight: bold;">/</span>phpthumb<span style="color: #000000; font-weight: bold;">/</span>phpThumb.php?<span style="color: #007800;">src</span>=images<span style="color: #000000; font-weight: bold;">/</span>gallery<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">w</span></span>=<span style="color: #000000;">200</span><span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #007800;">aoe</span>=<span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>What this will do is cause Apache to &#8220;rewrite&#8221; URL requests from <em>www.yoursite.com/images/gallery/thumbs/[some_image_file]</em> to the phpThumb library at <em>www.yoursite.com/phpthumb/phpThumb.php</em> with the actual image path attached as a GET variable.</p>
<p>Once you have made the neccessary changes to the htaccess file, you can upload an image to your <em>/images/gallery</em> folder. For testing purposes we will upload a file named &#8220;test.jpg&#8221;, a 2000px by 2000px photo.</p>
<p>Open your browser and go to <em>www.yoursite.com/images/gallery/thumb/test.jpg</em>, you should see a thumbnail of test.jpg with a width of 200 pixels.</p>
<p>This means that we can now just use the thumbnail URL (<em>images/gallery/thumb</em>) for the thumbnails and the normal URL (<em>images/gallery</em>) for viewing the original images.</p>
<h4>Final Thoughts</h4>
<p>You can do a lot more than just resize images using phpThumb, take a look at the Parameter List at <a href="http://phpthumb.sourceforge.net/demo/docs/phpthumb.readme.txt" target="_blank">http://phpthumb.sourceforge.net/demo/docs/phpthumb.readme.txt</a> and see for yourself.</p>
<p>phpThumb has the ability to overlay other images, crop images, add borders, add shadows, change color tones, and even change the image format between JPEG, GIF, PNG, and (if you have ImageMagick enabled on your server) BMP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gsol.co.za/2010/10/using-phpthumb-to-auto-generate-thumbnail-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reduce a PDF file size with Adobe Acrobat Pro</title>
		<link>http://blog.gsol.co.za/2010/10/how-to-reduce-a-pdf-file-size-with-adobe-acrobat-pro/</link>
		<comments>http://blog.gsol.co.za/2010/10/how-to-reduce-a-pdf-file-size-with-adobe-acrobat-pro/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 12:46:25 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Gsupport]]></category>

		<guid isPermaLink="false">http://blog.gsol.co.za/?p=300</guid>
		<description><![CDATA[Follow these practical steps to easily reduce a PDF file size with Adobe Acrobat Pro: 1.  Open the PDF file in Adobe Pro 2.  Click on Advanced in the top menu 3.  Select PDF Optimizer 4.  Set all the DPI fields to 100dpi as shown below 5.  You can also select additional options under &#8216;Discard [...]]]></description>
			<content:encoded><![CDATA[<p>Follow these practical steps to easily reduce a PDF file size with Adobe Acrobat Pro:</p>
<p>1.  Open the PDF file in Adobe Pro</p>
<p>2.  Click on Advanced in the top menu</p>
<p>3.  Select PDF Optimizer</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/10/Pic-1.jpg"></a><a href="http://blog.gsol.co.za/wp-content/uploads/2010/10/Pic-11.jpg"><img class="aligncenter size-full wp-image-303" title="Pic 1" src="http://blog.gsol.co.za/wp-content/uploads/2010/10/Pic-11.jpg" alt="" width="610" height="325" /></a></p>
<p>4.  Set all the DPI fields to 100dpi as shown below</p>
<p><a href="http://blog.gsol.co.za/wp-content/uploads/2010/10/pic-2.jpg"><img class="aligncenter size-full wp-image-302" title="pic 2" src="http://blog.gsol.co.za/wp-content/uploads/2010/10/pic-2.jpg" alt="" width="610" height="326" /></a></p>
<p>5.  You can also select additional options under &#8216;Discard User Data&#8217; to safely reduce the file size</p>
<p>6.  Click OK</p>
<p>7.  Save the file under a new file name when prompted</p>
<p>This method will safely reduce a PDF file size without noticeably reducing the quality. One can reduce the file size further by lowering quality settings or further reducing the DPI but a drop in quality will be noticed</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.gsol.co.za/2010/10/how-to-reduce-a-pdf-file-size-with-adobe-acrobat-pro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

