<?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>TechTrouts.com &#187; php</title>
	<atom:link href="http://techtrouts.com/topics/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtrouts.com</link>
	<description>Doin' the dev dance o/</description>
	<lastBuildDate>Thu, 23 Jul 2009 10:42:09 +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>Rot13 Email Protection for WordPress</title>
		<link>http://techtrouts.com/rot13-email-protection-for-wordpress/</link>
		<comments>http://techtrouts.com/rot13-email-protection-for-wordpress/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 19:27:08 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress-plugins]]></category>

		<guid isPermaLink="false">http://techtrouts.com/rot13-email-protection-for-wordpress/</guid>
		<description><![CDATA[Rot13 Email Protection for WordPress, protects all email addresses and mailto: links on your blog from email harvesters using rot13 encryption and/or text mode. Inspired by ROT13 encryption on Textmate; I&#8217;ve developed this plugin a while ago, i&#8217;ve now updated it to a releasable version, already working up to wordpress 2.5.1 ROT13 Email Protection at [...]]]></description>
			<content:encoded><![CDATA[<p>Rot13 Email Protection for <a href="http://wordpress.org/" title="WordPress › Blog Tool and Weblog Platform" target="_blank">WordPress</a>, protects all email addresses and mailto: links on your blog from email harvesters using rot13 encryption and/or text mode.<br />
Inspired by ROT13 encryption on <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X" target="_blank">Textmate</a>;</p>
<p>I&#8217;ve developed this plugin a while ago, i&#8217;ve now updated it to a releasable version, already working up to wordpress 2.5.1</p>
<p><a href="http://wordpress.org/extend/plugins/rot13-email-protection/" target="_blank" title="ROT13 Email Protection v0.1 plugin for Worpress">ROT13 Email Protection at Worpress Plugins</a></p>
<p><a href="http://downloads.wordpress.org/plugin/rot13-email-protection.zip" title="Download ROT13 Email Protection v0.1">Download ROT13 Email Protection Plugin v0.1! </a></p>
<p>In order to install it, as most wordpress plugins, just put the rot13_email_protection.php file  inside your <em>/wp-content/plugins</em> folder.</p>
<p>Any bugs, give me a comment, i&#8217;ll check on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/rot13-email-protection-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>NaturePhp 0.1 now waiting for php 5.3.0 &#8230;</title>
		<link>http://techtrouts.com/naturephp-now-waiting-for-php-530/</link>
		<comments>http://techtrouts.com/naturephp-now-waiting-for-php-530/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 17:43:06 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://techtrouts.com/naturephp-now-waiting-for-php-530/</guid>
		<description><![CDATA[Because it requires a few of the upcoming PHP features, naturePhp 0.1&#8242;s release is now on standby for PHP 5.3.0&#8242;s release. For now i can only say it is my favorite toolkit ever, and we&#8217;ve been using and improving it quite a lot on it&#8217;s limited PHP 5.2.6 version&#8230; - ok, so it&#8217;s a biased [...]]]></description>
			<content:encoded><![CDATA[<p>Because it requires a few of the upcoming PHP features,  naturePhp 0.1&#8242;s release is now on standby for PHP 5.3.0&#8242;s release. For now i can only say it is my favorite toolkit ever, and we&#8217;ve been using and improving it quite a lot on it&#8217;s limited PHP 5.2.6 version&#8230;</p>
<p>- ok, so it&#8217;s a biased opinion&#8230; :/</p>
<p>NaturePhp itself is basically a plug-in system for the coolest functionalities  around &#8211; most of the upcoming functionalities are either gathered from <a href="http://wordpress.org" title="WordPress &gt; Blog Tool and Weblog Platform" target="_blank">wordpress</a>, <a href="http://joomla.org" title="Joomla! - Content Management System and Web Application Framework" target="_blank">joomla!</a>, <a href="http://codeigniter.com" title="CodeIgniter - Open source PHP web application framework" target="_blank">CodeIgniter</a> and others, as well as a few of our own &#8211; *and a few <a href="http://rubyonrails.org" title="Ruby on Rails - Web application framework optimized for sustainable programming productivity" target="_blank">RubyOnRails</a> original ideas implemented in php ;)</p>
<p>The functionalities are organized into classes, and the classes are organized into <em>namespaces</em>, providing a great deal of &#8220;space&#8221; for future plug-in developments.<br />
It uses <em>__autoload()</em> for all classes, meaning it is just as fast no matter how many plug-ins you have installed.<br />
NaturePhp does not aim being labeled as a framework, but, being a pluggable toolkit itself, it allows future developers to build their own frameworks as plug-ins. &#8211; The idea is to provide a stable ground for common development and lot&#8217;s of easy to use functionalities for developers &#8211; much like Phyton&#8217;s libraries.</p>
<p>We are currently using <em>Namespace_Class::method()</em> instead of <em>Namespace::Class::method()</em> and <em>Class::callStatic($func_name, [$arg1, $arg2... $argN])</em> instead of <em>Class::func_name([$arg1, $arg2... $argN])</em> to workaround the lack of &#8220;<em>Namespaces&#8221;</em> and method overloading &#8220;<em>__callStatic()&#8221;</em> support on PHP 5.2.6, as these two features are required for most of the toolkit functionalities.<br />
It&#8217;s ugly, but it keeps the toolkit usable and developed while we wait for PHP 5.3.0.</p>
<p>As soon as PHP 5.3.0 comes out we&#8217;ll implement the necessary <em>namespaces</em> and change all the  <em>Class::callStatic($func_name, [$arg1, $arg2... $argN])</em> calls to <em>Class::func_name([$arg1, $arg2... $argN])</em> &#8211; so probably a couple of weeks after PHP 5.3.0&#8242;s release we&#8217;ll have a NaturePhp 0.1 out ;)</p>
<p>While we wait, we&#8217;re also finishing the NaturePhp&#8217;s website at <a href="http://naturephp.org" title="NaturePhp - Open Source Natural PHP Toolkit" target="_blank">http://naturephp.org</a> ;</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/naturephp-now-waiting-for-php-530/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php cycle through object properties</title>
		<link>http://techtrouts.com/php-cycle-through-object-properties/</link>
		<comments>http://techtrouts.com/php-cycle-through-object-properties/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 10:35:05 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techtrouts.com/php-cycle-through-object-properties/</guid>
		<description><![CDATA[for the example object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 class Test&#123; &#160; //public props public $var1=&#34;Value 1&#34;; public $var2=&#34;Value 2&#34;; public $var3=&#34;Value 3&#34;; &#160; //private props private $var4=&#34;Value 4&#34;; &#160; //public method public function public_function&#40;&#41;&#123; return true; &#125; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>for the example object:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Test<span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//public props</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var1</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 1&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var2</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 2&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var3</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 3&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//private props</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$var4</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 4&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//public method</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> public_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//private method</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> private_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>You can cycle  through the public object properties as you would with an array:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$test</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Test<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$test</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$prop_name</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$prop_value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #000088;">$prop_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'=&amp;gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$prop_value</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;br&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The result will be:</p>
<pre>
var1=&gt;Value 1
var2=&gt;Value 2
var3=&gt;Value 3</pre>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/php-cycle-through-object-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using MySQL Stored Procedures in PHP ( MySQL error #1312 )</title>
		<link>http://techtrouts.com/using-mysql-stored-procedures-in-php/</link>
		<comments>http://techtrouts.com/using-mysql-stored-procedures-in-php/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 11:31:32 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techtrouts.com/using-mysql-stored-procedures-in-php/</guid>
		<description><![CDATA[Hello again, in order to use Stored Procedures in MySQL through PHP you usually either use pdo or mysqli connections. However if do not wish to redo your application connections and you don&#8217;t require any out parameters you can use &#8220;mysql_connect($host, $user, $password, true, 65536);&#8221; on connection, using the 65536 ( CLIENT_MULTI_STATEMENTS ) internal magic [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again,</p>
<p>in order to use Stored Procedures in MySQL through PHP you usually either use <em>pdo</em> or <em>mysqli</em> connections.<br />
However if do not wish to redo your application connections and you don&#8217;t require any out parameters you can use &#8220;mysql_connect($host, $user, $password, true, 65536);&#8221; on connection, using the <em>65536</em> ( <code>CLIENT_MULTI_STATEMENTS</code> ) internal magic constant. But you can make only one stored procedure call per connection, and there is no support for <code>OUT</code> parameters. It is not currently documented, but can be found in the php header file.</p>
<p>If you do not use this connection method, you&#8217;ll get a  &#8220;#1312 &#8211; PROCEDURE <em>database</em>.<em>procedure</em> can&#8217;t return a result set in the given context&#8221; error whenever you CALL a procedure that returns a result set.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/using-mysql-stored-procedures-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP has encountered an Access Violation at xxxxxxxx</title>
		<link>http://techtrouts.com/php-has-encountered-an-access-violation-at-xxxxxxxx/</link>
		<comments>http://techtrouts.com/php-has-encountered-an-access-violation-at-xxxxxxxx/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 15:17:16 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://techtrouts.com/php-has-encountered-an-access-violation-at-xxxxxxxx/</guid>
		<description><![CDATA[For PHP 5.2.x x86 on Microsoft Windows Server 2003 with IIS 6.0: Simply put: reinstall php &#8211; worked for me.]]></description>
			<content:encoded><![CDATA[<p>For PHP 5.2.x x86 on Microsoft Windows Server 2003 with IIS 6.0:</p>
<p>Simply put: re<a href="http://techtrouts.com/install-php-on-windows-2003-server/" title="How to install php on windows 2003 server">install php</a> &#8211; worked for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/php-has-encountered-an-access-violation-at-xxxxxxxx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install php on Windows 2003 Server</title>
		<link>http://techtrouts.com/install-php-on-windows-2003-server/</link>
		<comments>http://techtrouts.com/install-php-on-windows-2003-server/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 15:13:27 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://techtrouts.com/install-php-on-windows-2003-server/</guid>
		<description><![CDATA[Here is a little how-to based on my personal experience: Download the latest stable .zip from php.net at windows binaries &#8211;&#62; PHP x.x.x zip package unzip the package to c:\php move the content ( extension dlls ) from c:\php\ext to c:\php create a test file at one of your local websites ( c:\Inetpub\wwwroot\test.php ? ) [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a little how-to based on my personal experience:</p>
<ol>
<li> Download the latest stable .zip from <a href="http://www.php.net/downloads.php" title="Download php" target="_blank">php.net</a> at <em>windows binaries</em> &#8211;&gt;   <em>PHP x.x.x zip package</em></li>
<li>unzip the package to c:\php</li>
<li>move the content ( extension dlls ) from c:\php\ext to c:\php</li>
<li>create a test file at one of your local websites ( c:\Inetpub\wwwroot\test.php ? ) with &#8220;&lt;?php phpinfo();?&gt;&#8221;</li>
<li>open IIS</li>
<li>right-click on your &#8220;website&#8221; ( where you stored test.php ) and select  &#8220;Properties&#8221;</li>
<li>Select the &#8220;Home Directory&#8221; tab and choose &#8220;Configuration&#8221;</li>
<li>Choose &#8220;Add&#8221;</li>
<li>Add &#8220;C:\php\php5isapi.dll&#8221; (including quotes) to &#8220;Executable&#8221; and add .php as extension. Then limit the verbs to GET,HEAD,POST,TRACE and click on OK</li>
<li>Now choose the &#8220;Documents&#8221; tab and select &#8220;Add&#8221;</li>
<li>Enter index.php and click on OK</li>
<li>Finally, select Web Service Extensions on the left side and choose &#8220;Add a new Web service extension&#8221;</li>
<li>Select &#8220;Add&#8221; and enter as path C:\php\php5isapi.dll and click on OK</li>
<li>Then enter php5 as extension name and check &#8220;Set extension status to Allowed&#8221;. Then click on OK to enable this extension</li>
<li>Now go to My Computer&gt;Right-Click&gt;Properties</li>
<li>Click on &#8220;Environment Variables&#8221;</li>
<li>Scroll to &#8220;path&#8221; and click &#8220;Edit&#8221;</li>
<li>add &#8220;;C:\php\&#8221; and click OK</li>
<li>Restart IIS</li>
<li>Open your  &#8220;test.php&#8221; in a browser window ( http://localhost/test.php ? )</li>
</ol>
<p>Should be done.</p>
<p>To add php extensions ( curl, etc ) uncomment the dll call lines on php.ini .</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/install-php-on-windows-2003-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning python</title>
		<link>http://techtrouts.com/learning-python/</link>
		<comments>http://techtrouts.com/learning-python/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 14:26:58 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://techtrouts.com/learning-python/</guid>
		<description><![CDATA[Yes, it&#8217;s true &#8211; i&#8217;m starting on python. Why? - Autoload libraries ( Modules &#8211; similar to naturePhp&#8217;s toolkit system ) is a default system; - a small core; - namespaces and modules; - indentation is used to mark out block structure rather than curly braces &#8211; much cleaner code; - everything is a reference! [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, it&#8217;s true &#8211; i&#8217;m starting on python.</p>
<p>Why?</p>
<p>- Autoload libraries ( Modules &#8211; similar to naturePhp&#8217;s toolkit system ) is a default system;<br />
- a small core;<br />
- namespaces and modules;<br />
- indentation is used to mark out block structure rather than curly braces &#8211; much cleaner code;<br />
- everything is a reference!<br />
- a simple array slicing syntax;<br />
- lambdas and other built-in functional programming constructs;</p>
<p>I always asked myself why Google uses so much python, now i know.</p>
<p>I&#8217;ll still be working on naturePhp and with PHP in general, i still think PHP is much more easy to setup and learn, as well as more resourceful, and most of the shared server environments use PHP, so <a href="http://naturephp.org" title="NaturePhp PHP Toolkit" target="_blank">naturePhp toolkit</a> is continuing to be a must have &#8211; especially with the oncoming namespaces on PHP 5.2.3 ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/learning-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
