<?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>SoliTech GmbH &#187; Tutorials</title>
	<atom:link href="http://www.solitechgmbh.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solitechgmbh.com</link>
	<description>Connecting businesses to people through effective online marketing strategy</description>
	<lastBuildDate>Thu, 13 May 2010 19:14:39 +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>Using rsync for quick server migartion</title>
		<link>http://www.solitechgmbh.com/2010/03/06/using-rsync-for-quick-server-migartion/</link>
		<comments>http://www.solitechgmbh.com/2010/03/06/using-rsync-for-quick-server-migartion/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 14:10:12 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=583</guid>
		<description><![CDATA[Previously when migrating servers, we would have to perform many, often lengthy steps to finish the job. Now, I like to use just one simple rsync command and let it take care of things. It is not only simpler but it also take a lot less time since you can utilize the hosts bandwidth to ...<br /><a href="http://www.solitechgmbh.com/2010/03/06/using-rsync-for-quick-server-migartion/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Previously when migrating servers, we would have to perform many, often lengthy steps to finish the job. Now, I like to use just one simple rsync command and let it take care of things. It is not only simpler but it also take a lot less time since you can utilize the hosts bandwidth to its fullest by transferring things directly between servers.</p>
<p>Before, I would have to zip up the web files, download them, upload them, and then unizp. Now I can accomplish all that with just this simple command.</p>
<blockquote><p>rsync -avzh &#8211;rsh=&#8217;ssh -p1234&#8242; user@old_server.solitechgmbh.com:/var/www/ /var/www/</p></blockquote>
<p>you can also use &#8211;stats &#8211;progress to get some visual feedback</p>
<p>I also use this just for regular offline backups of the server and it works great!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2010/03/06/using-rsync-for-quick-server-migartion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free CMS or Custom coded website</title>
		<link>http://www.solitechgmbh.com/2010/02/16/open-source-cms-or-custom-websites/</link>
		<comments>http://www.solitechgmbh.com/2010/02/16/open-source-cms-or-custom-websites/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 06:22:47 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[News and Updates]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Marketing Strategy]]></category>
		<category><![CDATA[smart budgeting]]></category>
		<category><![CDATA[smart development]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=577</guid>
		<description><![CDATA[As open source website frame works such as ZenCart and WordPress get better, do you still need a custom coded website? Not really, unless you need something very very special. In most cases you are better off creating addons and custom themes for these frameworks. They are now so feature rich that it would probably ...<br /><a href="http://www.solitechgmbh.com/2010/02/16/open-source-cms-or-custom-websites/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>As open source website frame works such as ZenCart and WordPress get better, do you still need a custom coded website? Not really, unless you need something very very special. In most cases you are better off creating addons and custom themes for these frameworks. They are now so feature rich that it would probably take $25,000 &#8211; $50,000 or even more to recreate it and months to do all the testing required.</p>
<p>These platforms have huge communities behind them, they are robust, and they are more importantly community tested. Any custom piece of software is prone to bugs and will break when faced with unforeseen circumstances. These platforms have been around for a while and have been through pretty much everything the web can throw at them. They are sill not perfect but pretty close and getting closer each day.</p>
<p>They have sophisticated admin interfaces and are for the most part fairly easy to customize. Since the pieces are mostly all there, you can see great results with very little spent. Even better, there are companies specializing in customization of these frameworks so you get good quality and good prices. You will also save in the long run since the framework lets you make edits easily often without requiring to know programming. This will also make your site more easily updatable and more attractive to search engines.</p>
<p>I have had very pleased customers with either WordPress or Zen cart. As the name implies, WordPress is a publishing interface used by blogs and ZenCart is an online store software but do not box them in just yet. The beauty of these frameworks is their flexibility. You can use WordPress to create a regular static website or you can make everything completely dynamic and content driven. You can also start static and add features such as Facebook integration as you go later. Same goes for the ZenCart software. You can start with an average shopping cart and add regular website content as you go.</p>
<p>There are lots of other benefits that I won&#8217;t go into detail about right now such as one click SEO optimization, automatically updating plugins, twitter module, facebook module, one click install of thousands of extensions and much much more. Each one of these probably deserves their own article.</p>
<p>To demonstrate the power of these platforms, I will be adding some case studies of some clients in the future so you can see what just a few hours of work can do. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2010/02/16/open-source-cms-or-custom-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Random String generator CakePHP component</title>
		<link>http://www.solitechgmbh.com/2009/10/20/updated-random-string-generator-cakephp-component/</link>
		<comments>http://www.solitechgmbh.com/2009/10/20/updated-random-string-generator-cakephp-component/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 04:38:42 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=535</guid>
		<description><![CDATA[Here is a new component that will generate random strings for you. You can pass it a set of characters to pick from and how long your random string should be. I use it to generate passwords but you can do just about anything with it. To use it, create a file called random_helper.php in ...<br /><a href="http://www.solitechgmbh.com/2009/10/20/updated-random-string-generator-cakephp-component/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Here is a new component that will generate random strings for you. You can pass it a set of characters to pick from and how long your random string should be. I use it to generate passwords but you can do just about anything with it.</p>
<p>To use it, create a file called random_helper.php in app/controllers/components and copy the following code.</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>
<span style="color: #000000; font-weight: bold;">class</span> RandomHelperComponent <span style="color: #000000; font-weight: bold;">extends</span> Object <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Random string generator function
 *
 * This function will randomly generate a password from a given set of characters
 *
 * @param int = 8, length of the password you want to generate
 * @param string = 0123456789abcdefghijklmnopqrstuvwxyz all possible values
 * @return string, the password
 */</span>     
	<span style="color: #000000; font-weight: bold;">function</span> generateRandomString <span style="color: #009900;">&#40;</span><span style="color: #000088;">$length</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">8</span><span style="color: #339933;">,</span> <span style="color: #000088;">$possible</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'0123456789abcdefghijklmnopqrstuvwxyz'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">// initialize variables</span>
		<span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">// add random characters to $password until $length is reached</span>
		<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">// pick a random character from the possible ones</span>
			<span style="color: #000088;">$char</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$possible</span><span style="color: #339933;">,</span> <span style="color: #990000;">mt_rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$possible</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #666666; font-style: italic;">// we don't want this character if it's already in the password</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$password</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
				<span style="color: #000088;">$password</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$char</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>make sure you include it in the appcontroller as such</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$components</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Auth'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Email'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'RandomHelper'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>then you can call it as follows in any function</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$password</span><span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RandomHelper</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">generateRandomString</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'abcdefghijklmnopqrstuvwxyz'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2009/10/20/updated-random-string-generator-cakephp-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Bit.ly Class to use with CakePHP or by it self</title>
		<link>http://www.solitechgmbh.com/2009/08/06/new-bit-ly-class-to-use-with-cakephp-or-by-it-self/</link>
		<comments>http://www.solitechgmbh.com/2009/08/06/new-bit-ly-class-to-use-with-cakephp-or-by-it-self/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 23:53:52 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Bit.LY]]></category>
		<category><![CDATA[cake]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=515</guid>
		<description><![CDATA[If you use service like Twitter where you only get a limited number of characters to post or if you are just sick of dealing with unruly long urls you might be familliar with url shortening services such as Bit.ly. I personally like them because of they offer a nice API and statistics all for ...<br /><a href="http://www.solitechgmbh.com/2009/08/06/new-bit-ly-class-to-use-with-cakephp-or-by-it-self/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>If you use service like Twitter where you only get a limited number of characters to post or if you are just sick of dealing with unruly long urls you might be familliar with url shortening services such as Bit.ly.</p>
<p>I personally like them because of they offer a nice API and statistics all for free. It is a pretty quick service too. You can generate hundreds of URLs in just a few seconds. All you have to do is register and you get a username and API key which you will need in the following section.</p>
<p>Here is the code &#8230; As you can see I only implemented the shorten for now but I will probably add some of the other stuff later. For some reason WP won&#8217;t let me post curl_exec( so be sure to remove the extra character.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> bitly <span style="color: #009900;">&#123;</span>
	<span style="color: #009933; font-style: italic;">/**
	 * A PHP class to utilize the bitly API
	 * through the Bitly API. Handles:
	 * - Shorten
	 *
	 * Requires PHP5, CURL, JSON and a Bitly account http://bit.ly/
	 *
	 * Bitly API documentation: http://code.google.com/p/bitly-api/wiki/ApiDocumentation
	 */</span>
&nbsp;
	protected <span style="color: #000088;">$appkey</span><span style="color: #339933;">;</span>
	protected <span style="color: #000088;">$login</span><span style="color: #339933;">;</span>
	protected <span style="color: #000088;">$version</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	* Contruct the Bitly Class
	*
    * @param string, your Bitly account key
    * @param string, your Bitly account login
	*/</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$login</span><span style="color: #339933;">,</span> <span style="color: #000088;">$appkey</span><span style="color: #339933;">,</span> <span style="color: #000088;">$version</span><span style="color: #339933;">=</span><span style="color: #0000ff;">'2.0.1'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>login <span style="color: #339933;">=</span> <span style="color: #000088;">$login</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>appkey <span style="color: #339933;">=</span> <span style="color: #000088;">$appkey</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>version <span style="color: #339933;">=</span> <span style="color: #000088;">$version</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #009933; font-style: italic;">/**
	* Retrieve a shortened URL
	*
    * @param string, url to shorten
    * @param string, version of Bitly to use
	*/</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> shorten<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">//create the URL</span>
		<span style="color: #000088;">$api_url</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://api.bit.ly/shorten?version='</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>version<span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;amp;longUrl='</span><span style="color: #339933;">.</span><span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;amp;format=xml&amp;amp;login='</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>login<span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;amp;apiKey='</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>appkey<span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//call the API</span>
		<span style="color: #000088;">$curl</span> <span style="color: #339933;">=</span> <span style="color: #990000;">curl_init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #000088;">$api_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">curl_setopt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> curl_ex_ec<span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">curl_close</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$curl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//parse the XML response and return the url</span>
		<span style="color: #000088;">$xml_object</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleXMLElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$xml_object</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>results<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>nodeKeyVal<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>shortUrl<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>If you want to use this in CakePHP &#8230; you will want to do something like this.<br />
Put this line before the class &#8230; I actually use this in a helper since this is a view level class</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">App<span style="color: #339933;">::</span><span style="color: #004000;">import</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Vendor'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Bitly'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;file&quot;</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&quot;bitly/bitly.class.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now you can just invoke it in one of your functions somewhere with two simple calls!</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$bitly</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Bitly<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'username'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'your_API_key_here'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$short_url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$bitly</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>shorten<span style="color: #009900;">&#40;</span><span style="color: #000088;">$long_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Simple as that &#8230; oh and one more thing. Be sure to have CURL installed else this won&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2009/08/06/new-bit-ly-class-to-use-with-cakephp-or-by-it-self/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to use your social network to make money</title>
		<link>http://www.solitechgmbh.com/2009/07/29/how-to-use-your-social-network-to-make-money/</link>
		<comments>http://www.solitechgmbh.com/2009/07/29/how-to-use-your-social-network-to-make-money/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 05:11:50 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[News and Updates]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[RewardChamp]]></category>
		<category><![CDATA[Social Marketing]]></category>
		<category><![CDATA[social networking]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=512</guid>
		<description><![CDATA[Are you a frequent user of social networking websites such as MySpace, Twitter, Facebook, LinkedIn, Friendster, Bebo and many more? Wondering how to turn your social media followers int some cash? Try using a service such as Reward Champ! http://www.rewardchamp.com Reward Champ offers an easy way for you to turn your social network into a ...<br /><a href="http://www.solitechgmbh.com/2009/07/29/how-to-use-your-social-network-to-make-money/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>Are you a frequent user of social networking websites such as MySpace, Twitter, Facebook, LinkedIn, Friendster, Bebo and many more? Wondering how to turn your social media followers int some cash? Try using a service such as Reward Champ!</p>
<p><a href="http://www.rewardchamp.com" target="_blank">http://www.rewardchamp.com</a></p>
<p>Reward Champ offers an easy way for you to turn your social network into a cash network with just a few clicks. You can use your social influence to your advantage and promote products and services that your followers might find useful. They have a large set of social publishing features on all offers so you can reach your friends on all major social networks such as Twitter, Facebook, MySpace, LinkedIn, Digg, etc. You will be credited for each offer they complete with points you can use for cash payments or gift certificates. By using your social network you can make hundreds of dollars, or even thousands each month and significantly boost to your monthly budget with just a few clicks a day. Making money from home made easy through social networking, and social media marketing.</p>
<p>Registration is free and you also get to compete for a weekly cash drawing on top of all the points you earn already. What do you have to loose?! Try social media marketing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2009/07/29/how-to-use-your-social-network-to-make-money/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to use MagpieRSS with CakePHP</title>
		<link>http://www.solitechgmbh.com/2009/07/23/how-to-use-magpierss-with-cakephp/</link>
		<comments>http://www.solitechgmbh.com/2009/07/23/how-to-use-magpierss-with-cakephp/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 20:54:49 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[MagpieRSS]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=507</guid>
		<description><![CDATA[MagpieRSS is a PHP based RSS parser that can be downloaded here http://magpierss.sourceforge.net/ What good is it you ask? You can use it to pull in information from any RSS feed and do what ever you want with the data. For example I use it to pull the RSS feed from my blog and display ...<br /><a href="http://www.solitechgmbh.com/2009/07/23/how-to-use-magpierss-with-cakephp/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>MagpieRSS is a PHP based RSS parser that can be downloaded here <a href="http://magpierss.sourceforge.net/" target="_blank">http://magpierss.sourceforge.net/</a></p>
<p>What good is it you ask? You can use it to pull in information from any RSS feed and do what ever you want with the data. For example I use it to pull the RSS feed from my blog and display links to my latest posts on <a title="http://www.rewardchamp.com/" href="http://www.rewardchamp.com/" target="_blank">http://www.rewardchamp.com</a> You can see it on the bottom of the page.</p>
<p>CakePHP makes this way to easy! First you need to download the MagpieRSS files from the link above and then extract to your vendors folder.</p>
<p>You need to put this line at the very top of your controller file you want to use RSS with. Before the class declaration</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">App<span style="color: #339933;">::</span><span style="color: #004000;">import</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Vendor'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'Snoopy'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;file&quot;</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&quot;magpierss/extlib/Snoopy.class.inc&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now inside a function you want create a new Snoopy object. I use Snoopy because I&#8217;m lazy &#8230; MagpieRSS is not constructed as Classes like CakePHP would like it to be &#8230; Snoopy is. Snoopy will return XML for you which you can make into an easily usable object with SimpleXMLElement. You can var_dump to see what exactly is in this object. You can figure out what to do from there.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$snoopy</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Snoopy<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$snoopy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://www.solitechgmbh.com/your/feed/here'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimpleXMLElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$snoopy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">channel</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">item</span><span style="color: #339933;">;</span></pre></div></div>

<p>Something like this will get you the title for example.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">echo</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span><span style="color: #339933;">;</span></pre></div></div>

<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2009/07/23/how-to-use-magpierss-with-cakephp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple thumbnail generator helper for CakePHP</title>
		<link>http://www.solitechgmbh.com/2008/07/02/simple-thumbnail-generator-for-cakephp/</link>
		<comments>http://www.solitechgmbh.com/2008/07/02/simple-thumbnail-generator-for-cakephp/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 19:48:15 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Image]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Thumbnail]]></category>

		<guid isPermaLink="false">http://www.gyuropia.com/?p=44</guid>
		<description><![CDATA[This simple CakePHP helper class will create thumbnails of images for you. Most of this code was actually taken from an other website (here) so I can&#8217;t claim all the credit but I did make it a little smarter. I added checking for the thumbnail so its not re generated every time. This will save ...<br /><a href="http://www.solitechgmbh.com/2008/07/02/simple-thumbnail-generator-for-cakephp/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>This simple CakePHP helper class will create thumbnails of images for you. Most of this code was actually taken from an other website (<a href="http://bakery.cakephp.org/articles/view/image-resize-helper">here</a>) so I can&#8217;t claim all the credit but I did make it a little smarter.</p>
<p>I added checking for the thumbnail so its not re generated every time. This will save you some CPU cycles and load time for the users.</p>
<p>You would call it with something like this</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$image</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">resize</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'image.jpg'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'border'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'0'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'alt'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'My Image'</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>1. To use it you should make a folder called /webroot/img/imagecache and make sure it is writable to all.<br />
2. Create a file called /views/helpers/image.php and copy the following code into it.</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>
<span style="color: #000000; font-weight: bold;">class</span> ImageHelper <span style="color: #000000; font-weight: bold;">extends</span> Helper <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$helpers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$cacheDir</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'imagecache'</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">function</span> resize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #339933;">,</span> <span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #339933;">,</span> <span style="color: #000088;">$aspect</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> <span style="color: #000088;">$htmlAttributes</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$return</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$types</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">&quot;gif&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;jpeg&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;png&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;swf&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;psd&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;wbmp&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// used to determine image type </span>
&nbsp;
		<span style="color: #000088;">$fullpath</span> <span style="color: #339933;">=</span> ROOT<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span>APP_DIR<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span>WEBROOT_DIR<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>themeWeb<span style="color: #339933;">.</span>IMAGES_URL<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$fullpath</span><span style="color: #339933;">.</span><span style="color: #000088;">$path</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span> <span style="color: #339933;">=</span> <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #b1b100;">return</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// image doesn't exist</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$aspect</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// adjust to aspect.</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span><span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span><span style="color: #000088;">$width</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>  <span style="color: #666666; font-style: italic;">// $size[0]:width, [1]:height, [2]:type</span>
				<span style="color: #000088;">$width</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #000088;">$height</span> <span style="color: #339933;">=</span> <span style="color: #990000;">ceil</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span> <span style="color: #339933;">/</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">/</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000088;">$relfile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>cacheDir<span style="color: #339933;">.</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$width</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'x'</span><span style="color: #339933;">.</span><span style="color: #000088;">$height</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_'</span><span style="color: #339933;">.</span><span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// relative file</span>
		<span style="color: #000088;">$cachefile</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$fullpath</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>cacheDir<span style="color: #339933;">.</span>DS<span style="color: #339933;">.</span><span style="color: #000088;">$width</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'x'</span><span style="color: #339933;">.</span><span style="color: #000088;">$height</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'_'</span><span style="color: #339933;">.</span><span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// location on server</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">file_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cachefile</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$csize</span> <span style="color: #339933;">=</span> <span style="color: #990000;">getimagesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cachefile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$cached</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$csize</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$csize</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// image is cached</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">filemtime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$cachefile</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #339933;">@</span><span style="color: #990000;">filemtime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// check if up to date</span>
			<span style="color: #000088;">$cached</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$cached</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$cached</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$resize</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$width</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$resize</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$resize</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$image</span> <span style="color: #339933;">=</span> <span style="color: #990000;">call_user_func</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'imagecreatefrom'</span><span style="color: #339933;">.</span><span style="color: #000088;">$types</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">function_exists</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;imagecreatetruecolor&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecreatetruecolor</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #990000;">imagecopyresampled</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$image</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$temp</span> <span style="color: #339933;">=</span> <span style="color: #990000;">imagecreate</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #990000;">imagecopyresized</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$image</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$width</span><span style="color: #339933;">,</span> <span style="color: #000088;">$height</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
				<span style="color: #990000;">call_user_func</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;image&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$types</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$size</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$temp</span><span style="color: #339933;">,</span> <span style="color: #000088;">$cachefile</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #990000;">imagedestroy</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$image</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #990000;">imagedestroy</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$temp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>output<span style="color: #009900;">&#40;</span><span style="color: #990000;">sprintf</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>Html<span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>image<span style="color: #009900;">&#40;</span><span style="color: #000088;">$relfile</span><span style="color: #339933;">,</span><span style="color: #000088;">$htmlAttributes</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You can see it in action at <a href="http://www.rewardchamp.com">http://www.rewardchamp.com</a>, the rewards box towards the top has the thumbnail images showing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2008/07/02/simple-thumbnail-generator-for-cakephp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix the CakePHP 1.2 RC1 Email sender problem</title>
		<link>http://www.solitechgmbh.com/2008/07/02/how-to-fix-the-cakephp-12-rc1-email-sender-problem/</link>
		<comments>http://www.solitechgmbh.com/2008/07/02/how-to-fix-the-cakephp-12-rc1-email-sender-problem/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 19:34:05 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[RC1]]></category>

		<guid isPermaLink="false">http://www.gyuropia.com/?p=43</guid>
		<description><![CDATA[After I upgraded from CakePHP 1.2 to the new CakePHP 1.2 RC1 my emails started to show all the header information instead of just the relevant message. After a LONG time of searching the web, I have not found an answer so I started to investigate my self. I started to look at the Email ...<br /><a href="http://www.solitechgmbh.com/2008/07/02/how-to-fix-the-cakephp-12-rc1-email-sender-problem/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>After I upgraded from CakePHP 1.2 to the new CakePHP 1.2 RC1 my emails started to show all the header information instead of just the relevant message.</p>
<p>After a LONG time of searching the web, I have not found an answer so I started to investigate my self.</p>
<p>I started to look at the Email component and didn&#8217;t see any changes that should make a difference until I got to the $_newLine variable.</p>
<p>It used to be $_newLine = &#8220;\n&#8221;; but now it is $_newLine = &#8220;\r\n&#8221;; which apparently does not get interpreted by Gmail well. I don&#8217;t know how other email services behave, I just tested with Gmail.</p>
<p>So to fix this issue you want to add this line when you are assembling an email anywhere before the send call.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Email</span><span style="color: #339933;">-&gt;</span>_newLine <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></pre></div></div>

<p>This will over ride the faulty default setting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2008/07/02/how-to-fix-the-cakephp-12-rc1-email-sender-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix problems with your network</title>
		<link>http://www.solitechgmbh.com/2008/06/19/how-to-fix-problems-with-our-network/</link>
		<comments>http://www.solitechgmbh.com/2008/06/19/how-to-fix-problems-with-our-network/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 16:03:52 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[network problems]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.solitechgmbh.com/?p=231</guid>
		<description><![CDATA[Following these steps will fix most of your networking issues Restart you Cable or DSL modem This is the device your phone cord or cable plugs in unplug the power cord. wait about 10 seconds plug the cord back in wait until all the green lights come back on (about 20 &#8211; 30 seconds) Restart ...<br /><a href="http://www.solitechgmbh.com/2008/06/19/how-to-fix-problems-with-our-network/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<h2><span class="mw-headline">Following these steps will fix most of your networking issues </span></h2>
<h3><span class="editsection"><a title="Edit section: Restart you Cable or DSL modem" href="../wiki/index.php?title=How_to_fix_problems_with_our_network&amp;action=edit&amp;section=2"></a></span><span class="mw-headline">Restart you Cable or DSL modem </span></h3>
<p>This is the device your phone cord or cable plugs in</p>
<ol>
<li>unplug the power cord.</li>
<li>wait about 10 seconds</li>
<li>plug the cord back in</li>
<li>wait until all the green lights come back on (about 20 &#8211; 30 seconds)</li>
</ol>
<h3><span class="mw-headline">Restart your wireless router </span></h3>
<p>This is the device the modem plugs in and has the antennas.</p>
<ol>
<li>unplug the power cord.</li>
<li>wait about 10 seconds</li>
<li>plug the cord back in</li>
<li>wait until all the green lights come back on (about 20 &#8211; 30 seconds)</li>
</ol>
<h3><span class="mw-headline">Restart your network switch or hub </span></h3>
<p>This is a device most of your network cables go in.</p>
<ol>
<li>unplug the power cord.</li>
<li>wait about 10 seconds</li>
<li>plug the cord back in</li>
<li>wait until most the green lights come back on (about 10 seconds)</li>
</ol>
<h3><span class="mw-headline">Reset your computers network connections </span></h3>
<p><strong><span class="mw-headline">Do this section for wireless network computers only </span></strong></p>
<ol>
<li>open your wireless connection controller and select the network you want to connect to.</li>
<li>wait until it connects and shows that you have a good signal strength</li>
</ol>
<p><strong><span class="mw-headline">Do this section for all computers </span></strong></p>
<ol>
<li>click start</li>
<li>click run</li>
<li>enter cmd into the text box</li>
</ol>
<blockquote>
<pre>cmd</pre>
</blockquote>
<ol>
<li>reset the IP address of your computer with the following commands. This might take 20 &#8211; 30 seconds.</li>
</ol>
<blockquote>
<pre>ipconfig /release
ipconfig /renew</pre>
</blockquote>
<ol>
<li>now check to make sure you got the right settings. You should see something like IP Address 192.168.1.X</li>
</ol>
<blockquote>
<pre>ipconfig</pre>
</blockquote>
<ol>
<li>try to access a computer on the network</li>
<li>open internet explorer and see if you can connect to a website</li>
</ol>
<p>If you can not connect ti the internet, repeat all the steps and try again.</p>
<p>If you still can not connect, call your tech support person and tell them all the steps you took so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2008/06/19/how-to-fix-problems-with-our-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random password generator component for CakePHP</title>
		<link>http://www.solitechgmbh.com/2008/06/11/random-password-generator-component-for-cakephp/</link>
		<comments>http://www.solitechgmbh.com/2008/06/11/random-password-generator-component-for-cakephp/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 15:51:49 +0000</pubDate>
		<dc:creator>Gyuri</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Generator]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Random]]></category>

		<guid isPermaLink="false">http://www.gyuropia.com/?p=42</guid>
		<description><![CDATA[This is a component I put together for CakePHP 1.2 RC1 that will generate a random password. All you have to pass it is the length of the password. To use it, make this file app/controllers/components/password_helper.php You can use it in a controller by adding &#8216;PasswordHelper&#8217; to the $components array. You can adjust the $possible ...<br /><a href="http://www.solitechgmbh.com/2008/06/11/random-password-generator-component-for-cakephp/">Read more...</a>]]></description>
			<content:encoded><![CDATA[<p>This is a component I put together for CakePHP 1.2 RC1 that will generate a random password. All you have to pass it is the length of the password.</p>
<p>To use it, make this file app/controllers/components/password_helper.php</p>
<p>You can use it in a controller by adding &#8216;PasswordHelper&#8217; to the $components array.</p>
<p>You can adjust the $possible set with your desired characters.</p>
<p>Here is the code:</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>
<span style="color: #000000; font-weight: bold;">class</span> PasswordHelperComponent <span style="color: #000000; font-weight: bold;">extends</span> Object <span style="color: #009900;">&#123;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * Password generator function
 *
 * This function will randomly generate a password from a given set of characters
 *
 * @param int = 8, length of the password you want to generate
 * @return string, the password
 */</span>    
    <span style="color: #000000; font-weight: bold;">function</span> generatePassword <span style="color: #009900;">&#40;</span><span style="color: #000088;">$length</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">8</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// initialize variables</span>
        <span style="color: #000088;">$password</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$possible</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0123456789bcdfghjkmnpqrstvwxyz&quot;</span><span style="color: #339933;">;</span> 
&nbsp;
        <span style="color: #666666; font-style: italic;">// add random characters to $password until $length is reached</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// pick a random character from the possible ones</span>
            <span style="color: #000088;">$char</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$possible</span><span style="color: #339933;">,</span> <span style="color: #990000;">mt_rand</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">strlen</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$possible</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// we don't want this character if it's already in the password</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">strstr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$password</span><span style="color: #339933;">,</span> <span style="color: #000088;">$char</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
                <span style="color: #000088;">$password</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$char</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.solitechgmbh.com/2008/06/11/random-password-generator-component-for-cakephp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
