<?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>Aris Royo&#039;s Blog &#187; Programming</title>
	<atom:link href="http://arisroyo.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://arisroyo.com</link>
	<description>Advocating and contributing to ideals of free software.</description>
	<lastBuildDate>Sat, 28 Jan 2012 06:15:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My Daily Git</title>
		<link>http://arisroyo.com/2011/06/09/my-daily-git/</link>
		<comments>http://arisroyo.com/2011/06/09/my-daily-git/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 23:00:30 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Community]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Version Control System]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=493</guid>
		<description><![CDATA[I finally complete learning how to Git and after a few days of reading and testing I made some list of Git command that will help from a daily programming routine. $git  init – Create empty git project. $git status – Check the status of a current branch. $git log – To check the branch [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-635" title="git-logo" src="http://arisroyo.com/wp-content/uploads/2011/06/git-logo.png" alt="" width="188" height="97" />I finally complete learning how to Git and after a few days of reading and testing I made some list of Git command that will help from a daily programming routine.</p>
<p><strong>$git  init </strong>– Create empty git project.</p>
<p><strong>$git status</strong> – Check the status of a current branch.</p>
<p><strong>$git log </strong>– To check the branch commit log and<br />
information.</p>
<p><strong>$git add &lt;file name&gt;</strong> &#8211; To add file/change to Git<br />
repository.</p>
<p><strong>$git commit –m “Comment Text”</strong> – To commit changes<br />
and put comment.</p>
<p><strong>$git branch &lt;branch name&gt;</strong> &#8211; Create a new branch name<br />
from the current branch.</p>
<p><strong>$git tag &lt;tag name&gt; </strong>- Create a tag of a branch of<br />
the current state.</p>
<p><strong>$git tag  and  $git  branch</strong> – To list down tag and<br />
branch name</p>
<p><strong>$git checkout &lt;branch name&gt; </strong>- To switch to different<br />
branch</p>
<p><strong>$git checkout –b &lt;branch name&gt; </strong>- Create a new branch<br />
name with automatic check out.</p>
<p><strong>$git diff &lt;branch name 1&gt; &lt;branch name 2&gt; </strong> &#8211; To<br />
check the difference within two branch</p>
<p><strong>$git branch –d  &lt;branch name&gt;</strong> &#8211; Delete the specific<br />
branchname.</p>
<p><strong>$git merge –no-ff &lt;branch name&gt; </strong>-Recursively merges<br />
the current branch.</p>
<p><strong>$git stash </strong>– To save the current  changes in a work<br />
space.</p>
<p><strong>$git stash apply</strong> – To apply the stash in the current<br />
branch state.</p>
<p><strong>$git stash list</strong> – get the list of stash updates.</p>
<p><strong>$git stash clear </strong>– Clear stash updates.</p>
<p><strong>$git pull &lt;Path name&gt; </strong>- Full repository  and to<br />
update all branch</p>
<p><strong>$git clone &lt;Origin repository path&gt; &lt;Your repository<br />
path&gt;.</strong> &#8211; Clone / Copy repository.</p>
<p><strong>$git pull &lt;Orign repository parth&gt; &lt;branch name&gt;</strong> -<br />
Pull specific branch name from origin.</p>
<p><strong>$git push origin </strong>– Push update of the current branch<br />
to origin &lt;Maker sure origin branch name are been checkout.</p>
<p><strong>$git push origin &lt;branch name&gt; </strong>- To push the<br />
new/specific branch to origin.</p>
<p><strong>$git push origin :&lt;branch name&gt; </strong>- To delete the<br />
specific branch name from the origin.</p>
<p><strong>$git reset  – hard &lt;tag name&gt;</strong> &#8211; Roll back base on<br />
tag state.</p>
<p><strong>$git remote rm origin</strong> – remove remote origin.</p>
<p><strong>$git remote add origin &lt;Path name&gt;</strong> &#8211; Add an origin<br />
repository.</p>
<p><strong>$git reset –hard origin/master</strong> – Update your master<br />
branch to origin (overwriting update).</p>
<blockquote><p><a href="http://git-scm.com/">Git is a free &amp; open source</a>, distributed version control system designed to handle everything from small to very large projects with speed and efficiency.</p></blockquote>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2011/10/18/defend-the-freedom-to-install-free-software/" title="Defend The Freedom To Install Free Software">Defend The Freedom To Install Free Software</a></li><li><a href="http://arisroyo.com/2011/08/17/the-three-3-house-bill-that-may-change-technology-in-philippines/" title="The Three (3) House Bill That May Change Technology In Philippines">The Three (3) House Bill That May Change Technology In Philippines</a></li><li><a href="http://arisroyo.com/2011/05/02/business-can-save-a-lot-of-money-by-using-free-software/" title="Business Can Save A Lot Of Money By Using Free Software">Business Can Save A Lot Of Money By Using Free Software</a></li><li><a href="http://arisroyo.com/2010/10/10/finally-ubuntu-10-is-here/" title="Finally Ubuntu 10.10 Is Here!">Finally Ubuntu 10.10 Is Here!</a></li><li><a href="http://arisroyo.com/2010/09/19/software-freedom-day-2010-philippines/" title="Software Freedom Day 2010 (Philippines)">Software Freedom Day 2010 (Philippines)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/06/09/my-daily-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Is A Templating Language</title>
		<link>http://arisroyo.com/2011/05/12/php-is-a-templating-language/</link>
		<comments>http://arisroyo.com/2011/05/12/php-is-a-templating-language/#comments</comments>
		<pubDate>Thu, 12 May 2011 00:00:57 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=475</guid>
		<description><![CDATA[I found out this blog post from Terry Chay he is a PHP developer and advocate, this is one of his post about the important about PHP as programming language. PHP is a templating language, not a general purpose or even an object oriented language. Embrace it. Don&#8217;t fight it; Don&#8217;t introduce frameworks just for [...]]]></description>
			<content:encoded><![CDATA[<p>I found out this blog post from <a href="http://terrychay.com/">Terry Chay</a> he is a PHP developer and advocate, this is one of his post about the important about PHP as programming language.</p>
<p>PHP is a templating language, not a general purpose or even an object oriented language. Embrace it. Don&#8217;t fight it;</p>
<p>Don&#8217;t introduce frameworks just for the sake of them. This goes back to the fundamental principle that you shouldn&#8217;t solve a problem until you have a problem. Developers these days I find are somewhat &#8220;framework trigger happy&#8221; (&#8220;I&#8217;m sick of writing if (s == null || s.equals(&#8220;&#8221;)), lets add Apache Commons Validator to the project!&#8221;);</p>
<p>Always reuse code rather than cutting and pasting it unless the code is so trivial (say under 10 lines) or would require too much parametrization (say 5+ parameters) to effectively reuse;</p>
<p>Strive to minimize lines of code as best you can;</p>
<p>Don&#8217;t try and do things the Java, C# or Ruby way in PHP. Do things the PHP way. Those other languages each have fundamentally different models;</p>
<p>Never, ever, ever use require_once or include_once. Some will no doubt disagree with this but I see those as being symptomatic of laziness and poor organization. They&#8217;re also slower than require and include and arguably anathema to caching;</p>
<p>Always use opcode caching. This is usually as simple as turning APC on in your php.ini; Use output buffering (ie ob_start(), etc);</p>
<p>Set up common constants, database connections and so on in a file that you include at the top of every one of your scripts; and</p>
<p>Be consistent. I can&#8217;t stress how important that is.</p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li><li><a href="http://arisroyo.com/2012/01/12/php-w3schools-certified/" title="PHP w3Schools Certified">PHP w3Schools Certified</a></li><li><a href="http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/" title="Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]">Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]</a></li><li><a href="http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/" title="Shop &#038; Pay Cash &#8211; Facebook Apps">Shop &#038; Pay Cash &#8211; Facebook Apps</a></li><li><a href="http://arisroyo.com/2011/04/30/sharing-simple-php-web-application-project/" title="Sharing Simple PHP Web Application Project ">Sharing Simple PHP Web Application Project </a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/05/12/php-is-a-templating-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install And Configure LAMP [Linux, Apache, MySql &amp; PHP]</title>
		<link>http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/</link>
		<comments>http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/#comments</comments>
		<pubDate>Fri, 06 May 2011 01:00:40 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=464</guid>
		<description><![CDATA[Sharing some of my configuration using Linux Trisquel Gnu/Linux free operating software, as a web developer LAMP or Linux Apache MySql and PHP are some of standard application, database and tools that I use in daily programming life. Why Linux? Because it&#8217;s free and makes your laptop or desktop more powerful and advance in computing [...]]]></description>
			<content:encoded><![CDATA[<p>Sharing some of my configuration using Linux Trisquel Gnu/Linux free operating software, as a web developer LAMP or Linux Apache MySql and PHP are some of standard application, database and tools that I use in daily programming life.</p>
<p>Why Linux? Because it&#8217;s free and makes your laptop or desktop more powerful and advance in computing and not like propriety software every tools that you need in development you can get it free and more thing it&#8217;s really cool being free or open source developer.</p>
<p>Linux is your operating system that has a lot of flavor or faces that you can get and download for free, I personally using Trisquel Gnu/Linux that you may download at <a href="http://trisquel.info">http://trisquel.info</a></p>
<p>Now let&#8217;s start installing Apache, you must first login as root or administrator on your Linux machine.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="php"><span class="php-var">$</span> sudo su</span></pre>
</div>
<p>Install in configure apache by calling the following command.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="php"><span class="php-var">$</span> sudo aptitude install apache<span class="php-number">2</span></span></pre>
</div>
<p>The following path and command are some reference you need to know about apache in your machine.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
</pre>
<pre><span class="php"><span class="php-operator">/</span><span class="php-keyword">var</span><span class="php-operator">/</span>ww <span class="php-operator">-</span> Here is your <span class="php-keyword">default</span> document root<span class="php-operator">.</span>
<span class="php-operator">/</span>etc<span class="php-operator">/</span>apache<span class="php-number">2</span><span class="php-operator">/</span>apache<span class="php-number">2</span><span class="php-operator">.</span>conf <span class="php-operator">-</span> Configuration later we need to access this <span class="php-keyword">for</span> some modification<span class="php-operator">.</span>
 <span class="php-operator">/</span>etc<span class="php-operator">/</span>init<span class="php-operator">.</span>d<span class="php-operator">/</span>apache<span class="php-number">2</span> restart This the command to restart the Apache server
 <span class="php-operator">/</span>etc<span class="php-operator">/</span>init<span class="php-operator">.</span>d<span class="php-operator">/</span>apache<span class="php-number">2</span> stop This is the command to stop Apache server
 <span class="php-operator">/</span>etc<span class="php-operator">/</span>init<span class="php-operator">.</span>d<span class="php-operator">/</span>apache<span class="php-number">2</span> start This the command to start it again</span></pre>
</div>
<p>Now to install Mysql execute the command and make sure have properly record the password you provided to mysql database configuration.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="php"><span class="php-var">$</span> sudo aptitude install mysql<span class="php-operator">-</span>server mysql<span class="php-operator">-</span>client</span></pre>
</div>
<p>Last to install the PHP execute the following command</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="php"><span class="php-var">$</span> sudo aptitude install php<span class="php-number">5</span> libapache<span class="php-number">2</span><span class="php-operator">-</span>mod<span class="php-operator">-</span>php<span class="php-number">5</span></span></pre>
</div>
<p>To test the php restart the apache and create the following php script.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
</pre>
<pre><span class="php">Create <span class="php-function">phpinfo</span><span class="php-operator">.</span>php <span class="php-function">file</span> in <span class="php-operator">/</span><span class="php-keyword">var</span><span class="php-operator">/</span>www<span class="php-operator">/</span>
gedit <span class="php-operator">/</span><span class="php-keyword">var</span><span class="php-operator">/</span>www<span class="php-operator">/</span><span class="php-function">phpinfo</span><span class="php-operator">.</span>php
<span class="php-script-tag">&lt;?php</span> <span class="php-function">phpinfo</span><span class="php-brackets">(</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html"></span></span></span></pre>
</div>
<p>Test it by calling localhost/phpinfo.php in your browser</p>
<p>No for additional you also like to install phpMyAdmin and Open JDK here the following command.</p>
<p>Installing phpMyadmin</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="php"><span class="php-var">$</span> sudo aptitude install phpmyadmin</span></pre>
</div>
<p>During configuration chose the following option</p>
<ul>
<li>Select apache 2 in Configuring phpMyAdmin</li>
<li>Select No in Configuring database for phpMyAdmin</li>
<li>Edit apache configuration /etc/apache2/apache2.conf by adding the following line-<strong>Include /etc/phpmyadmin/apache.conf</strong>
</li>
</ul>
<p>Installing open-jdk</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
</pre>
<pre><span class="php"><span class="php-var">$</span> aptitude install openjdk<span class="php-operator">-</span><span class="php-number">6</span><span class="php-operator">-</span>jre
<span class="php-var">$</span> aptitude install openjdk<span class="php-operator">-</span><span class="php-number">6</span><span class="php-operator">-</span>jdk</span></pre>
</div>
<p><br/></p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2011/04/30/sharing-simple-php-web-application-project/" title="Sharing Simple PHP Web Application Project ">Sharing Simple PHP Web Application Project </a></li><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li><li><a href="http://arisroyo.com/2012/01/12/php-w3schools-certified/" title="PHP w3Schools Certified">PHP w3Schools Certified</a></li><li><a href="http://arisroyo.com/2011/07/04/avg-free-linux-anti-virus/" title="AVG Free Linux Antivirus">AVG Free Linux Antivirus</a></li><li><a href="http://arisroyo.com/2011/05/12/php-is-a-templating-language/" title="PHP Is A Templating Language">PHP Is A Templating Language</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shop &amp; Pay Cash &#8211; Facebook Apps</title>
		<link>http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/</link>
		<comments>http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/#comments</comments>
		<pubDate>Wed, 04 May 2011 23:00:08 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cashsense]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=458</guid>
		<description><![CDATA[March 2011, when I become a part of development group of cashsense.com, my part is to develop and integrate merchandise item to facebook application page as store, using the new facebook graph API and Java Script. It&#8217;s a wonderful and challenging experience working with developer with cashsense and I&#8217;m happy that I completed the project [...]]]></description>
			<content:encoded><![CDATA[<p>March 2011, when I become a part of development group of cashsense.com, my part is to develop and integrate merchandise item to facebook application page as store, using the new facebook graph API and Java Script.</p>
<p>It&#8217;s a wonderful and challenging experience working with developer with cashsense and I&#8217;m happy that I completed the project in 5 weeks.</p>
<p>Cashsense.com developer continues the enhancement of the application and I&#8217;m glad to see it now working well in facebook world and to see that the number of user&#8217;s is continuing to grow.</p>
<p>The facebook integration is consisting of the following component, facebook graph, facebook java script and off course cashsense API.</p>
<blockquote><p>Cashsense was originally conceived and formed in 2005 as the payment processing division for a multi-national IT development and marketing company based in Manila, Philippines.</p>
<p>Following the successful launch of its Overseas Filipino Workers (OFWs) remittance business, Cashsense continues to develop and launch additional business lines based on technological efficiencies and the straight-through processing of payments; payments made, primarily, by cash. &#8211; <a href="http://www.cashsense.com">www.cashsense.com</a></p></blockquote>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li><li><a href="http://arisroyo.com/2012/01/12/php-w3schools-certified/" title="PHP w3Schools Certified">PHP w3Schools Certified</a></li><li><a href="http://arisroyo.com/2011/05/12/php-is-a-templating-language/" title="PHP Is A Templating Language">PHP Is A Templating Language</a></li><li><a href="http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/" title="Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]">Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]</a></li><li><a href="http://arisroyo.com/2011/04/30/sharing-simple-php-web-application-project/" title="Sharing Simple PHP Web Application Project ">Sharing Simple PHP Web Application Project </a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharing Simple PHP Web Application Project</title>
		<link>http://arisroyo.com/2011/04/30/sharing-simple-php-web-application-project/</link>
		<comments>http://arisroyo.com/2011/04/30/sharing-simple-php-web-application-project/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 14:00:01 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Application]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=452</guid>
		<description><![CDATA[I&#8217;m sharing this simple PHP web application project that I found in my archive (Not in my closet), it’s for a cell phone loading station business I develop 8 years ago. This php application includes GSM module and component and unfortunately I can’t share it because it’s proprietary software and develop by other person. I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sharing this simple PHP web application project that I found in my archive (Not in my closet), it’s for a cell phone loading station business I develop 8 years ago.</p>
<p>This php application includes GSM module and component and unfortunately I can’t share it because it’s proprietary software and develop by other person.</p>
<p>I intended to share this application for education purpose only specially for those students who are aiming to study PHP programing language.</p>
<p>This application is not using any framework and I admit that this is not fully proof designed php application but this good enough to have example PHP and MySQL from scratch.</p>
<p>Please note that this is my first PHP application develop on year 2004 after I graduated, you may study it share, enhance distribute but again is not suitable for business use.</p>
<p>Here is the following technologies and component:<br />
1.	PHP<br />
2.	MySQL<br />
3.	Ajax<br />
4.	HTML<br />
5.	Java Script<br />
6.	ActiveWidgets that work only in IE (Proprietary Software) <img src='http://arisroyo.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  </p>
<p><strong>Read READ ME.txt for installation and configuration.</strong></p>
<p><strong>Download Source Code:</strong> <a href="http://blog.arisroyo.com/projects/?did=1">http://blog.arisroyo.com/projects/?did=1</a></p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/" title="Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]">Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]</a></li><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li><li><a href="http://arisroyo.com/2012/01/12/php-w3schools-certified/" title="PHP w3Schools Certified">PHP w3Schools Certified</a></li><li><a href="http://arisroyo.com/2011/05/12/php-is-a-templating-language/" title="PHP Is A Templating Language">PHP Is A Templating Language</a></li><li><a href="http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/" title="Shop &#038; Pay Cash &#8211; Facebook Apps">Shop &#038; Pay Cash &#8211; Facebook Apps</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/04/30/sharing-simple-php-web-application-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit WordPress 3.1.1 Meta Widgets</title>
		<link>http://arisroyo.com/2011/04/09/edit-wordpress-3-1-1-meta-widgets/</link>
		<comments>http://arisroyo.com/2011/04/09/edit-wordpress-3-1-1-meta-widgets/#comments</comments>
		<pubDate>Sat, 09 Apr 2011 01:08:21 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Meta]]></category>
		<category><![CDATA[Widgets]]></category>
		<category><![CDATA[WP]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=428</guid>
		<description><![CDATA[Open the file wp-includes\default-widgets.php Go to line 279. Here you can remove or add links that been display in WordPress default Meta Widgets. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 [...]]]></description>
			<content:encoded><![CDATA[<p>Open the file <strong>wp-includes\default-widgets.php</strong></p>
<p>Go to line 279.</p>
<p>Here you can remove or add links that been display in WordPress default Meta Widgets.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
</pre>
<pre><span class="php"><span class="php-keyword">class</span> WP_Widget_Meta <span class="php-keyword">extends</span> WP_Widget <span class="php-brackets">{</span>

	<span class="php-function">function</span> WP_Widget_Meta<span class="php-brackets">(</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-var">$widget_ops</span> <span class="php-operator">=</span> <span class="php-keyword">array</span><span class="php-brackets">(</span><span class="php-string">'classname'</span> <span class="php-operator">=</span><span class="php-operator">&gt;</span> <span class="php-string">'widget_meta'</span>, <span class="php-string">'description'</span> <span class="php-operator">=</span><span class="php-operator">&gt;</span> __<span class="php-brackets">(</span> <span class="php-string">&quot;Log in/out, admin, feed and WordPress links&quot;</span><span class="php-brackets">)</span> <span class="php-brackets">)</span>;
		<span class="php-var">$this</span><span class="php-operator">-</span><span class="php-operator">&gt;</span>WP_Widget<span class="php-brackets">(</span><span class="php-string">'meta'</span>, __<span class="php-brackets">(</span><span class="php-string">'Meta'</span><span class="php-brackets">)</span>, <span class="php-var">$widget_ops</span><span class="php-brackets">)</span>;
	<span class="php-brackets">}</span>

	<span class="php-function">function</span> widget<span class="php-brackets">(</span> <span class="php-var">$args</span>, <span class="php-var">$instance</span> <span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-function">extract</span><span class="php-brackets">(</span><span class="php-var">$args</span><span class="php-brackets">)</span>;
		<span class="php-var">$title</span> <span class="php-operator">=</span> apply_filters<span class="php-brackets">(</span><span class="php-string">'widget_title'</span>, <span class="php-keyword">empty</span><span class="php-brackets">(</span><span class="php-var">$instance</span><span class="php-brackets">[</span><span class="php-string">'title'</span><span class="php-brackets">]</span><span class="php-brackets">)</span> <span class="php-operator">?</span> __<span class="php-brackets">(</span><span class="php-string">'Meta'</span><span class="php-brackets">)</span> <span class="php-operator">:</span> <span class="php-var">$instance</span><span class="php-brackets">[</span><span class="php-string">'title'</span><span class="php-brackets">]</span>, <span class="php-var">$instance</span>, <span class="php-var">$this</span><span class="php-operator">-</span><span class="php-operator">&gt;</span>id_base<span class="php-brackets">)</span>;

		<span class="php-keyword">echo</span> <span class="php-var">$before_widget</span>;
		<span class="php-keyword">if</span> <span class="php-brackets">(</span> <span class="php-var">$title</span> <span class="php-brackets">)</span>
			<span class="php-keyword">echo</span> <span class="php-var">$before_title</span> <span class="php-operator">.</span> <span class="php-var">$title</span> <span class="php-operator">.</span> <span class="php-var">$after_title</span>;
<span class="php-script-tag">?&gt;<span class="html">
			<span class="html-other-element">&lt;ul&gt;</span>
			</span>&lt;?php</span> wp_register<span class="php-brackets">(</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">
			<span class="html-other-element">&lt;li&gt;</span></span>&lt;?php</span> wp_loginout<span class="php-brackets">(</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html"><span class="html-other-element">&lt;/li&gt;</span>
			<span class="html-other-element">&lt;li&gt;</span><span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;</span></span></span>&lt;?php</span> bloginfo<span class="php-brackets">(</span><span class="php-string">'rss2_url'</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">&quot; title=&quot;</span>&lt;?php</span> <span class="php-keyword">echo</span> esc_attr<span class="php-brackets">(</span>__<span class="php-brackets">(</span><span class="php-string">'Syndicate this site using RSS 2.0'</span><span class="php-brackets">)</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">&quot;&gt;</span>&lt;?php</span> _e<span class="php-brackets">(</span><span class="php-string">'Entries &lt;abbr title=&quot;Really Simple Syndication&quot;&gt;RSS&lt;/abbr&gt;'</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html"><span class="html-anchor-element">&lt;/a&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
			<span class="html-other-element">&lt;li&gt;</span><span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;</span></span></span>&lt;?php</span> bloginfo<span class="php-brackets">(</span><span class="php-string">'comments_rss2_url'</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">&quot; title=&quot;</span>&lt;?php</span> <span class="php-keyword">echo</span> esc_attr<span class="php-brackets">(</span>__<span class="php-brackets">(</span><span class="php-string">'The latest comments to all posts in RSS'</span><span class="php-brackets">)</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">&quot;&gt;</span>&lt;?php</span> _e<span class="php-brackets">(</span><span class="php-string">'Comments &lt;abbr title=&quot;Really Simple Syndication&quot;&gt;RSS&lt;/abbr&gt;'</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html"><span class="html-anchor-element">&lt;/a&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
			<span class="html-other-element">&lt;li&gt;</span><span class="html-anchor-element">&lt;a href=<span class="html-attribute">&quot;http://wordpress.org/&quot;</span> title=<span class="html-attribute">&quot;</span></span></span>&lt;?php</span> <span class="php-keyword">echo</span> esc_attr<span class="php-brackets">(</span>__<span class="php-brackets">(</span><span class="php-string">'Powered by WordPress, state-of-the-art semantic personal publishing platform.'</span><span class="php-brackets">)</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">&quot;&gt;WordPress.org<span class="html-anchor-element">&lt;/a&gt;</span><span class="html-other-element">&lt;/li&gt;</span>
			</span>&lt;?php</span> wp_meta<span class="php-brackets">(</span><span class="php-brackets">)</span>; <span class="php-script-tag">?&gt;<span class="html">
			<span class="html-other-element">&lt;/ul&gt;</span>
</span>&lt;?php</span>
		<span class="php-keyword">echo</span> <span class="php-var">$after_widget</span>;
	<span class="php-brackets">}</span></span></pre>
</div>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li><a href="http://arisroyo.com/2011/02/25/wordpress-login-trouble-wp-login-php-404-not-found/" title="WordPress Login Trouble wp-login.php 404 not found.">WordPress Login Trouble wp-login.php 404 not found.</a></li><li><a href="http://arisroyo.com/2011/09/05/foss-for-advocacy/" title="FOSS FOR ADVOCACY">FOSS FOR ADVOCACY</a></li><li><a href="http://arisroyo.com/2011/06/11/leaving-developer-community-facebook-garage/" title="Leaving Developer Community Facebook Garage">Leaving Developer Community Facebook Garage</a></li><li><a href="http://arisroyo.com/2011/01/31/bits-%e2%80%93-batangas-information-technology-society-huge-success/" title="BITS – Batangas Information Technology Society Huge Success!">BITS – Batangas Information Technology Society Huge Success!</a></li><li><a href="http://arisroyo.com/2011/10/18/defend-the-freedom-to-install-free-software/" title="Defend The Freedom To Install Free Software">Defend The Freedom To Install Free Software</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/04/09/edit-wordpress-3-1-1-meta-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP cURL Example</title>
		<link>http://arisroyo.com/2011/03/25/php-curl-example/</link>
		<comments>http://arisroyo.com/2011/03/25/php-curl-example/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 00:00:52 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[cURL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=413</guid>
		<description><![CDATA[The following example is on how to use the PHP cURL request and transform the respond data into simple xml content. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 [...]]]></description>
			<content:encoded><![CDATA[<p>The following example is on how to use the PHP cURL request and transform the respond data into simple xml content.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
</pre>
<pre><span class="php"><span class="php-comment">//construct required data
</span>
<span class="php-var">$data</span>  <span class="php-operator">=</span> <span class="php-string">'UserName='</span><span class="php-operator">.</span><span class="php-var">$userName</span><span class="php-operator">.</span><span class="php-string">'&amp;Password='</span><span class="php-operator">.</span><span class="php-var">$passWord</span><span class="php-operator">.</span><span class="php-string">''</span>;

<span class="php-comment">//build header for request
</span>
<span class="php-var">$headers</span> <span class="php-operator">=</span> <span class="php-keyword">array</span><span class="php-brackets">(</span>
	<span class="php-string">&quot;POST /submit/form.php HTTP/1.1&quot;</span>,
	<span class="php-string">&quot;Host: test.mydomain.com&quot;</span>,
	<span class="php-string">&quot;Content-type: application/x-www-form-urlencoded&quot;</span>,
	<span class="php-string">&quot;Content-length: &quot;</span><span class="php-operator">.</span><span class="php-function">strlen</span><span class="php-brackets">(</span><span class="php-var">$data</span><span class="php-brackets">)</span>
	<span class="php-brackets">)</span>; 

<span class="php-comment">//initialize curl and execute
</span>
<span class="php-var">$ch</span> <span class="php-operator">=</span> <span class="php-function">curl_init</span><span class="php-brackets">(</span><span class="php-brackets">)</span>;
<span class="php-function">curl_setopt</span><span class="php-brackets">(</span><span class="php-var">$ch</span>, CURLOPT_HTTPHEADER,<span class="php-var">$headers</span><span class="php-brackets">)</span>;
<span class="php-function">curl_setopt</span><span class="php-brackets">(</span><span class="php-var">$ch</span>, CURLOPT_URL,
	<span class="php-string">&quot;http://test.mydomain.com/test/submit/form.php&quot;</span><span class="php-brackets">)</span>; <span class="php-comment">// actual url to submit
</span>
<span class="php-function">curl_setopt</span><span class="php-brackets">(</span><span class="php-var">$ch</span>, CURLOPT_POST,<span class="php-number">1</span><span class="php-brackets">)</span>;
<span class="php-comment">//just retrive data don't write
</span>
<span class="php-function">curl_setopt</span><span class="php-brackets">(</span><span class="php-var">$ch</span>, CURLOPT_RETURNTRANSFER,<span class="php-number">1</span><span class="php-brackets">)</span>; 

<span class="php-comment">//provide required data
</span>
<span class="php-function">curl_setopt</span><span class="php-brackets">(</span><span class="php-var">$ch</span>, CURLOPT_POSTFIELDS, <span class="php-var">$data</span><span class="php-brackets">)</span>;
<span class="php-var">$content</span> <span class="php-operator">=</span> <span class="php-function">curl_exec</span><span class="php-brackets">(</span><span class="php-var">$ch</span><span class="php-brackets">)</span>;
<span class="php-function">curl_close</span><span class="php-brackets">(</span><span class="php-var">$ch</span><span class="php-brackets">)</span>;

<span class="php-comment">//tranfer to xml content respond should be xml format too.
</span>
<span class="php-var">$xml</span> <span class="php-operator">=</span> <span class="php-function">simplexml_load_string</span><span class="php-brackets">(</span><span class="php-var">$content</span>,<span class="php-string">'SimpleXMLElement'</span>, LIBXML_NOCDATA<span class="php-brackets">)</span>;</span></pre>
</div>
<p><br/><br />
Reference:<br />
<a href="http://php.net/manual/en/book.curl.php">http://php.net/manual/en/book.curl.php</a></p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li><li><a href="http://arisroyo.com/2012/01/12/php-w3schools-certified/" title="PHP w3Schools Certified">PHP w3Schools Certified</a></li><li><a href="http://arisroyo.com/2011/05/12/php-is-a-templating-language/" title="PHP Is A Templating Language">PHP Is A Templating Language</a></li><li><a href="http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/" title="Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]">Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]</a></li><li><a href="http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/" title="Shop &#038; Pay Cash &#8211; Facebook Apps">Shop &#038; Pay Cash &#8211; Facebook Apps</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/03/25/php-curl-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP FTP/SFTP Function</title>
		<link>http://arisroyo.com/2011/03/21/php-ftpsftp-function/</link>
		<comments>http://arisroyo.com/2011/03/21/php-ftpsftp-function/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 23:00:15 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SFTP]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=404</guid>
		<description><![CDATA[Sharing the two powerful PHP file transfer function using FTP and SFTP. FTP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 [...]]]></description>
			<content:encoded><![CDATA[<p>Sharing the two powerful PHP file transfer function using FTP and SFTP.</p>
<p><strong>FTP</strong></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
</pre>
<pre><span class="php"><span class="php-function">function</span> ftpUpload<span class="php-brackets">(</span><span class="php-var">$ftp_host</span>, <span class="php-var">$ftp_username</span>, <span class="php-var">$ftp_password</span>, <span class="php-var">$ftp_path</span>, <span class="php-var">$filename</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>

	<span class="php-comment">//Connect to FTP host
</span>
	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span><span class="php-var">$ftp</span> <span class="php-operator">=</span> <span class="php-function">ftp_connect</span><span class="php-brackets">(</span><span class="php-var">$ftp_host</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-function">die</span> <span class="php-brackets">(</span><span class="php-string">'Unable to connect to the specified FTP.'</span><span class="php-brackets">)</span>;
	<span class="php-brackets">}</span>

	<span class="php-comment">//Login to FTP
</span>
	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span><span class="php-var">$ftp</span>, <span class="php-var">$ftp_username</span>, <span class="php-var">$ftp_password</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-function">die</span> <span class="php-brackets">(</span><span class="php-string">'Unable to login to the FTP Server.'</span><span class="php-brackets">)</span>;
	<span class="php-brackets">}</span>

	<span class="php-comment">//local file name destination or new filename
</span>
	<span class="php-var">$local_filename</span> <span class="php-operator">=</span> <span class="php-var">$filename</span>;

	<span class="php-comment">//Upload file to ftp host.
</span>
	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span><span class="php-function">ftp_put</span><span class="php-brackets">(</span><span class="php-var">$ftp</span>, <span class="php-var">$filename</span>, <span class="php-var">$local_filename</span>, FTP_ASCII<span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Unable to upload file.'</span><span class="php-brackets">)</span>;
	<span class="php-brackets">}</span>

<span class="php-keyword">return</span> TRUE;

<span class="php-brackets">}</span></span></pre>
</div>
<p><br/><br />
<strong>SFTP</strong></p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
</pre>
<pre><span class="php"><span class="php-function">function</span> sftpUpload<span class="php-brackets">(</span><span class="php-var">$ftp_host</span>, <span class="php-var">$ftp_username</span>, <span class="php-var">$ftp_password</span>, <span class="php-var">$ftp_path</span>, <span class="php-var">$filename</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>

	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span> <span class="php-function">function_exists</span><span class="php-brackets">(</span><span class="php-string">'ssh2_connect'</span><span class="php-brackets">)</span><span class="php-brackets">)</span> <span class="php-brackets">{</span>
		<span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'function is not available.'</span><span class="php-brackets">)</span>;
	<span class="php-brackets">}</span>

	<span class="php-comment">//Connect to SFTP host
</span>
	<span class="php-var">$connection</span> <span class="php-operator">=</span> <span class="php-function">ssh2_connect</span><span class="php-brackets">(</span><span class="php-var">$loc_ftp_host</span>, <span class="php-var">$port</span><span class="php-operator">=</span><span class="php-number">2</span><span class="php-number">2</span><span class="php-brackets">)</span>;
	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span> <span class="php-var">$connection</span><span class="php-brackets">)</span>
		<span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Could not connect to $ftp_host on port $port.'</span><span class="php-brackets">)</span>;

	<span class="php-comment">//Login to SFTP host
</span>
	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span> <span class="php-function">ssh2_auth_password</span><span class="php-brackets">(</span><span class="php-var">$connection</span>, <span class="php-var">$loc_ftp_username</span>, <span class="php-var">$loc_ftp_password</span><span class="php-brackets">)</span><span class="php-brackets">)</span>
		<span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Could not authenticate with username and password.'</span><span class="php-brackets">)</span>;

	<span class="php-var">$sftp</span> <span class="php-operator">=</span> <span class="php-function">ssh2_sftp</span><span class="php-brackets">(</span><span class="php-var">$connection</span><span class="php-brackets">)</span>;

	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span> <span class="php-var">$sftp</span><span class="php-brackets">)</span> <span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Could not initialize sftp subsystem.'</span><span class="php-brackets">)</span>;

	<span class="php-comment">//Create or open file
</span>
	<span class="php-var">$stream</span> <span class="php-operator">=</span> <span class="php-function">fopen</span><span class="php-brackets">(</span><span class="php-string">'ssh2.sftp://'</span><span class="php-operator">.</span><span class="php-var">$sftp</span><span class="php-operator">.</span><span class="php-var">$ftp_path</span><span class="php-operator">.</span><span class="php-string">'/'</span><span class="php-operator">.</span><span class="php-var">$filename</span>, <span class="php-string">'w'</span><span class="php-brackets">)</span>;

	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-operator">!</span> <span class="php-var">$stream</span><span class="php-brackets">)</span> <span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Could not open file: $filename'</span><span class="php-brackets">)</span>;

	<span class="php-var">$local_filename</span> <span class="php-operator">=</span> <span class="php-var">$filename</span>;

	<span class="php-var">$data_to_send</span> <span class="php-operator">=</span> <span class="php-function">file_get_contents</span><span class="php-brackets">(</span><span class="php-var">$local_filename</span><span class="php-brackets">)</span>;

	<span class="php-keyword">if</span> <span class="php-brackets">(</span><span class="php-var">$data_to_send</span> <span class="php-operator">=</span><span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-keyword">false</span><span class="php-brackets">)</span>
		<span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Could not open local file: $local_filename.'</span><span class="php-brackets">)</span>;

	<span class="php-keyword">if</span> <span class="php-brackets">(</span>@<span class="php-function">fwrite</span><span class="php-brackets">(</span><span class="php-var">$stream</span>, <span class="php-var">$data_to_send</span><span class="php-brackets">)</span> <span class="php-operator">=</span><span class="php-operator">=</span><span class="php-operator">=</span> <span class="php-keyword">false</span><span class="php-brackets">)</span>
	    <span class="php-function">die</span><span class="php-brackets">(</span><span class="php-string">'Could not send data from file: $local_filename.'</span><span class="php-brackets">)</span>;

	@<span class="php-function">fclose</span><span class="php-brackets">(</span><span class="php-var">$stream</span><span class="php-brackets">)</span>;

	<span class="php-keyword">return</span> TRUE;

<span class="php-brackets">}</span></span></pre>
</div>
<p><br/><br />
Reference:<br />
FTP Manual &#8211; <a href="http://php.net/manual/en/book.ftp.php">http://php.net/manual/en/book.ftp.php</a><br />
SFTP Manual &#8211; <a href="http://www.php.net/manual/en/ref.ssh2.php">http://www.php.net/manual/en/ref.ssh2.php</a></p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li><li><a href="http://arisroyo.com/2012/01/12/php-w3schools-certified/" title="PHP w3Schools Certified">PHP w3Schools Certified</a></li><li><a href="http://arisroyo.com/2011/05/12/php-is-a-templating-language/" title="PHP Is A Templating Language">PHP Is A Templating Language</a></li><li><a href="http://arisroyo.com/2011/05/06/install-and-configure-lamp-linux-apache-mysql-php/" title="Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]">Install And Configure LAMP [Linux, Apache, MySql &#038; PHP]</a></li><li><a href="http://arisroyo.com/2011/05/05/shop-pay-cash-facebook-apps/" title="Shop &#038; Pay Cash &#8211; Facebook Apps">Shop &#038; Pay Cash &#8211; Facebook Apps</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/03/21/php-ftpsftp-function/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Login Trouble wp-login.php 404 not found.</title>
		<link>http://arisroyo.com/2011/02/25/wordpress-login-trouble-wp-login-php-404-not-found/</link>
		<comments>http://arisroyo.com/2011/02/25/wordpress-login-trouble-wp-login-php-404-not-found/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 16:00:44 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.arisroyo.com/?p=393</guid>
		<description><![CDATA[After upgrading to WordPress 3.0.5 I was unable to login to my blog administrator, every-time I try to log-in Its been redirect to 404 Not Found Page. There is a lot of possible issue, so here is the following links, I tried to fix the problem, some of this may not necessary need to do [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading to WordPress 3.0.5 I was unable to login to my blog administrator, every-time I try to log-in Its been redirect to 404 Not Found Page.</p>
<p>There is a lot of possible issue, so here is the following links, I tried to fix the problem, some of this may not necessary need to do but if one solution didn’t fix this. it’s always nice to have another option.</p>
<p>1.Backup your “wp-content/plugins” folder and clear plugins folder and restore it one by one, so you could identify if the problem is one of your plugin.</p>
<p>This issue is normally happen when WordPress has an updates and one of your plugin is not compatible with it.</p>
<p>2.This documents is from WordPress : http://codex.wordpress.org/Login_Trouble</p>
<p>3.This solution is also worth to try, open your “wp-admin” folder open the file “admin.php” find and un-comment the following lines.</p>
<p>if ( current_user_can( &#8216;manage_options&#8217; ) )<br />
		@ini_set( &#8216;memory_limit&#8217;, apply_filters( &#8216;admin_memory_limit&#8217;, &#8217;256M&#8217; ) );</p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2012/01/20/when-internet-goes-dark-sopa/" title="When Internet Goes Dark [SOPA]">When Internet Goes Dark [SOPA]</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2011/02/25/wordpress-login-trouble-wp-login-php-404-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Personal Project Startup Flavor</title>
		<link>http://arisroyo.com/2010/07/12/personal-project-startup-flavor/</link>
		<comments>http://arisroyo.com/2010/07/12/personal-project-startup-flavor/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 23:00:18 +0000</pubDate>
		<dc:creator>Aris Royo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech Life]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[KISS]]></category>
		<category><![CDATA[Startup]]></category>

		<guid isPermaLink="false">http://www.arisroyo.com/?p=286</guid>
		<description><![CDATA[Previously I post about Invitation for Web 2.0 project startup my intention to invite developers or enthusiasm that is looking for partnership for a web 2.0 project startup. While waiting for some good response and for dedicated people out there, I start to wonder why I doing this things and why I&#8217;m really want to [...]]]></description>
			<content:encoded><![CDATA[<p>Previously I post about <a href="http://www.arisroyo.com/community/invitation-for-web-2-0-project-startup/">Invitation for Web 2.0 project startup</a> my intention to invite developers or enthusiasm that is looking for partnership for a web 2.0 project startup.</p>
<p>While waiting for some good response and for dedicated people out there, I start to wonder why I doing this things and why I&#8217;m really want to build my own project and after reading some startup books below is my Startup Flavors.</p>
<p><strong>Personal Project Startup:</strong></p>
<p>Start with a small but persistent happiness. It could be a gap between you and some existing program or web app, a feature no one seems to realize is needed, or just a desire to see what you can code. Add a skilled developer with dedicated time with a desire and belief on your idea to make his or her side project a full-fledged startup.</p>
<p><strong>Key ingredients:</strong> KISS Keep It simple stupid!  And Get Real! Build from free software/open source and interact to existing tools, apps and web.</p>
<p><strong>Pros:</strong> Personal projects are great résumé builders personally and for the team, it&#8217;s a great satisfaction for you from other programmers and to show to others developers the tools or web application that you contribute to a world wide web. They can also be the starting point for any one of the other kinds of startups.</p>
<p><strong>Cons:</strong> Dedication is the important resource, sometime project suffer from low financial support and its required highly skilled and dedicated developers.</p>
<p><strong>Bottom line:</strong> Personal projects are a great way to build your reputation, contribute new tools, service and technology. You don&#8217;t naturally like to get a reward (money)  and you know it will come along the way naturally if a lot of people are happy to use it.</p>
<h2  class="related_post_title">Related Topic</h2><ul class="related_post"><li><a href="http://arisroyo.com/2011/01/18/3rd-philippine-tech-startup/" title="3rd Philippine Tech Startup">3rd Philippine Tech Startup</a></li><li><a href="http://arisroyo.com/2009/12/10/thank-you-to-facebook-developer-garage-philippines/" title="Thank you to Facebook Developer Garage Philippines">Thank you to Facebook Developer Garage Philippines</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://arisroyo.com/2010/07/12/personal-project-startup-flavor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

