<?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>coretan si cuplis &#187; PHP</title>
	<atom:link href="http://cuplis.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://cuplis.net</link>
	<description>learn the way, define your own way</description>
	<lastBuildDate>Thu, 20 May 2010 08:25:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>algoritma deret fibonacci</title>
		<link>http://cuplis.net/2010/04/algoritma-deret-fibonacci/</link>
		<comments>http://cuplis.net/2010/04/algoritma-deret-fibonacci/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 14:33:34 +0000</pubDate>
		<dc:creator>cuplis</dc:creator>
				<category><![CDATA[Algoritma]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Flowchart]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://cuplis.net/?p=747</guid>
		<description><![CDATA[nih mumpung masih hangat, salah satu algoritma deret fibonacci :
flowchart :

contoh program :

$limit		= 10;
$fibonacci	= &#34;&#34;;
for&#40;$i=1;$i&#60;=$limit;$i++&#41;&#123;
	if&#40;$i == 1&#41;&#123;
		$value&#91;$i&#93;=1;
	&#125;else&#123;
		$value&#91;$i&#93;=$value&#91;$i-2&#93; + $value&#91;$i-1&#93;;
	&#125;
	$fibonacci .= $value&#91;$i&#93;.&#34; &#34;;
&#125;
echo $fibonacci;

output :
1 1 2 3 5 8 13 21 34 55



Bookmarks:


	
	
	
	
	




Related posts:algoritma segi tiga pascal mumpung masih hangat, berikut ini salah satu contoh algoritma segitiga...

Related posts brought to you by Yet Another Related [...]


Related posts:<ol><li><a href='http://cuplis.net/2010/04/algoritma-segi-tiga-pascal/' rel='bookmark' title='Permanent Link: algoritma segi tiga pascal'>algoritma segi tiga pascal</a> <small>mumpung masih hangat, berikut ini salah satu contoh algoritma segitiga...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>nih mumpung masih hangat, salah satu algoritma deret fibonacci :</p>
<p>flowchart :</p>
<p><a href="http://cuplis.net/wp-content/uploads/2010/04/flowchart-bilanganfibonacci.jpg"><img class="alignnone size-full wp-image-748" title="flowchart-bilanganfibonacci" src="http://cuplis.net/wp-content/uploads/2010/04/flowchart-bilanganfibonacci.jpg" alt="" width="402" height="696" /></a></p>
<p>contoh program :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$limit</span>		<span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$fibonacci</span>	<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #000088;">$limit</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</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;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$fibonacci</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$fibonacci</span><span style="color: #339933;">;</span></pre></div></div>

<p>output :<br />
1 1 2 3 5 8 13 21 34 55</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://cuplis.net/2010/04/algoritma-deret-fibonacci/" /></p>
<div class="sociable">
<div class="sociable_tagline">
<strong>Bookmarks:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-deret-fibonacci%2F&amp;t=algoritma%20deret%20fibonacci" title="Facebook"><img src="http://cuplis.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-deret-fibonacci%2F&amp;title=algoritma%20deret%20fibonacci&amp;annotation=nih%20mumpung%20masih%20hangat%2C%20salah%20satu%20algoritma%20deret%20fibonacci%20%3A%0D%0A%0D%0Aflowchart%20%3A%0D%0A%0D%0A%0D%0A%0D%0Acontoh%20program%20%3A%0D%0A%24limit%09%09%3D%2010%3B%0D%0A%24fibonacci%09%3D%20%22%22%3B%0D%0Afor%28%24i%3D1%3B%24i" title="Google Bookmarks"><img src="http://cuplis.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-deret-fibonacci%2F&amp;title=algoritma%20deret%20fibonacci&amp;bodytext=nih%20mumpung%20masih%20hangat%2C%20salah%20satu%20algoritma%20deret%20fibonacci%20%3A%0D%0A%0D%0Aflowchart%20%3A%0D%0A%0D%0A%0D%0A%0D%0Acontoh%20program%20%3A%0D%0A%24limit%09%09%3D%2010%3B%0D%0A%24fibonacci%09%3D%20%22%22%3B%0D%0Afor%28%24i%3D1%3B%24i" title="Digg"><img src="http://cuplis.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-deret-fibonacci%2F&amp;title=algoritma%20deret%20fibonacci&amp;source=coretan+si+cuplis+learn+the+way%2C+define+your+own+way&amp;summary=nih%20mumpung%20masih%20hangat%2C%20salah%20satu%20algoritma%20deret%20fibonacci%20%3A%0D%0A%0D%0Aflowchart%20%3A%0D%0A%0D%0A%0D%0A%0D%0Acontoh%20program%20%3A%0D%0A%24limit%09%09%3D%2010%3B%0D%0A%24fibonacci%09%3D%20%22%22%3B%0D%0Afor%28%24i%3D1%3B%24i" title="LinkedIn"><img src="http://cuplis.net/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=algoritma%20deret%20fibonacci%20-%20http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-deret-fibonacci%2F" title="Twitter"><img src="http://cuplis.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://cuplis.net/2010/04/algoritma-segi-tiga-pascal/' rel='bookmark' title='Permanent Link: algoritma segi tiga pascal'>algoritma segi tiga pascal</a> <small>mumpung masih hangat, berikut ini salah satu contoh algoritma segitiga...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://cuplis.net/2010/04/algoritma-deret-fibonacci/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>algoritma segi tiga pascal</title>
		<link>http://cuplis.net/2010/04/algoritma-segi-tiga-pascal/</link>
		<comments>http://cuplis.net/2010/04/algoritma-segi-tiga-pascal/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 13:16:45 +0000</pubDate>
		<dc:creator>cuplis</dc:creator>
				<category><![CDATA[Algoritma]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Flowchart]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://cuplis.net/?p=734</guid>
		<description><![CDATA[mumpung masih hangat, berikut ini salah satu contoh algoritma segitiga pascal beserta contoh codingnya di php
flowchart :

contoh program :

$limit	= 6;
$pascal	= &#34;&#34;;
for&#40;$i=1;$i&#60;=$limit;$i++&#41;&#123;
	for&#40;$j=1;&#60;=$i;$j++&#41;&#123;
		if&#40;$j==1 &#124;&#124; $j==$i&#41;&#123;
			$value&#91;$i&#93;&#91;$j&#93; = 1;
		&#125;else&#123;
			$value&#91;$i&#93;&#91;$j&#93; = $value&#91;$i-1&#93;&#91;$j&#93; + $value&#91;$i-1&#93;&#91;$j-1&#93;;
		&#125;
		$pascal .= $value&#91;$i&#93;&#91;$j&#93;.&#34; &#34;;
	&#125;
	$pascal .= &#34;
\n&#34;;
&#125;
echo $pascal;

output :




Bookmarks:


	
	
	
	
	




Related posts:algoritma deret fibonacci nih mumpung masih hangat, salah satu algoritma deret fibonacci :...

Related posts brought to you by Yet [...]


Related posts:<ol><li><a href='http://cuplis.net/2010/04/algoritma-deret-fibonacci/' rel='bookmark' title='Permanent Link: algoritma deret fibonacci'>algoritma deret fibonacci</a> <small>nih mumpung masih hangat, salah satu algoritma deret fibonacci :...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>mumpung masih hangat, berikut ini salah satu contoh algoritma segitiga pascal beserta contoh codingnya di php</p>
<p>flowchart :</p>
<p><a href="http://cuplis.net/wp-content/uploads/2010/04/flowchart-segitigapascal1.jpg"><img class="alignnone size-full wp-image-743" title="flowchart-segitigapascal" src="http://cuplis.net/wp-content/uploads/2010/04/flowchart-segitigapascal1.jpg" alt="" width="431" height="721" /></a></p>
<p>contoh program :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$limit</span>	<span style="color: #339933;">=</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$pascal</span>	<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;=</span><span style="color: #000088;">$limit</span><span style="color: #339933;">;</span><span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;&lt;=</span><span style="color: #000088;">$i</span><span style="color: #339933;">;</span><span style="color: #000088;">$j</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$j</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$j</span><span style="color: #339933;">==</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</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;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000088;">$pascal</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$j</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; &quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #000088;">$pascal</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;
<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$pascal</span><span style="color: #339933;">;</span></pre></div></div>

<p>output :</p>
<p><a href="http://cuplis.net/wp-content/uploads/2010/04/output-segitigapascal.png"><img class="alignnone size-full wp-image-739" title="output-segitigapascal" src="http://cuplis.net/wp-content/uploads/2010/04/output-segitigapascal.png" alt="" width="116" height="114" /></a></p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://cuplis.net/2010/04/algoritma-segi-tiga-pascal/" /></p>
<div class="sociable">
<div class="sociable_tagline">
<strong>Bookmarks:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-segi-tiga-pascal%2F&amp;t=algoritma%20segi%20tiga%20pascal" title="Facebook"><img src="http://cuplis.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-segi-tiga-pascal%2F&amp;title=algoritma%20segi%20tiga%20pascal&amp;annotation=mumpung%20masih%20hangat%2C%20berikut%20ini%20salah%20satu%20contoh%20algoritma%20segitiga%20pascal%20beserta%20contoh%20codingnya%20di%20php%0D%0A%0D%0Aflowchart%20%3A%0D%0A%0D%0A%0D%0A%0D%0Acontoh%20program%20%3A%0D%0A%24limit%09%3D%206%3B%0D%0A%24pascal%09%3D%20%22%22%3B%0D%0Afor%28%24i%3D1%3B%24i" title="Google Bookmarks"><img src="http://cuplis.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-segi-tiga-pascal%2F&amp;title=algoritma%20segi%20tiga%20pascal&amp;bodytext=mumpung%20masih%20hangat%2C%20berikut%20ini%20salah%20satu%20contoh%20algoritma%20segitiga%20pascal%20beserta%20contoh%20codingnya%20di%20php%0D%0A%0D%0Aflowchart%20%3A%0D%0A%0D%0A%0D%0A%0D%0Acontoh%20program%20%3A%0D%0A%24limit%09%3D%206%3B%0D%0A%24pascal%09%3D%20%22%22%3B%0D%0Afor%28%24i%3D1%3B%24i" title="Digg"><img src="http://cuplis.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-segi-tiga-pascal%2F&amp;title=algoritma%20segi%20tiga%20pascal&amp;source=coretan+si+cuplis+learn+the+way%2C+define+your+own+way&amp;summary=mumpung%20masih%20hangat%2C%20berikut%20ini%20salah%20satu%20contoh%20algoritma%20segitiga%20pascal%20beserta%20contoh%20codingnya%20di%20php%0D%0A%0D%0Aflowchart%20%3A%0D%0A%0D%0A%0D%0A%0D%0Acontoh%20program%20%3A%0D%0A%24limit%09%3D%206%3B%0D%0A%24pascal%09%3D%20%22%22%3B%0D%0Afor%28%24i%3D1%3B%24i" title="LinkedIn"><img src="http://cuplis.net/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=algoritma%20segi%20tiga%20pascal%20-%20http%3A%2F%2Fcuplis.net%2F2010%2F04%2Falgoritma-segi-tiga-pascal%2F" title="Twitter"><img src="http://cuplis.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://cuplis.net/2010/04/algoritma-deret-fibonacci/' rel='bookmark' title='Permanent Link: algoritma deret fibonacci'>algoritma deret fibonacci</a> <small>nih mumpung masih hangat, salah satu algoritma deret fibonacci :...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://cuplis.net/2010/04/algoritma-segi-tiga-pascal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>how to configure php as fastcgi on nginx</title>
		<link>http://cuplis.net/2009/10/how-to-configure-php-as-fastcgi-on-nginx/</link>
		<comments>http://cuplis.net/2009/10/how-to-configure-php-as-fastcgi-on-nginx/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 10:27:06 +0000</pubDate>
		<dc:creator>cuplis</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://cuplis.net/?p=691</guid>
		<description><![CDATA[
install php

user@computer:$ sudo apt-get install php5-cgi


buat file /etc/default/php-fastcgi

user@computer:$ sudo vim /etc/default/php-fastcgiSTART=yes# Which user runs PHP? (default: www-data)EXEC_AS_USER=www-data# Host and TCP port for FASTCGI-Listener (default: localhost:9000)FCGI_HOST=localhostFCGI_PORT=8888# Environment variables, which are processed by PHPPHP_FCGI_CHILDREN=4PHP_FCGI_MAX_REQUESTS=1000


buat file /etc/init.d/php-fastcgi

user@computer:$ sudo vim /etc/init.d/php-fastcgi#! /bin/bash### BEGIN INIT INFO# Provides:          php-fastcgi# Required-Start:    $all# Required-Stop:     $all# Default-Start:     2 3 4 5# Default-Stop:      0 1 [...]


Related posts:<ol><li><a href='http://cuplis.net/2009/10/how-to-install-and-configure-nginx-webserver-on-ubuntu/' rel='bookmark' title='Permanent Link: how to install and configure nginx webserver on ubuntu'>how to install and configure nginx webserver on ubuntu</a> <small>caranya cukup mudah : install nginx user@computer:$ sudo apt-get install...</small></li>
<li><a href='http://cuplis.net/2009/09/how-to-install-and-configure-dhcp-server/' rel='bookmark' title='Permanent Link: how to install and configure dhcp server'>how to install and configure dhcp server</a> <small>salah satu cara untuk configure dhcp server adalah sbb :...</small></li>
<li><a href='http://cuplis.net/2009/10/how-to-install-wordpress-mu-on-nginx/' rel='bookmark' title='Permanent Link: how to install wordpress mu on nginx'>how to install wordpress mu on nginx</a> <small>setting dns server tambahkan zone sarunkgenk.com di file /etc/bind/named.conf user@computer:$...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<ol>
<li>install php

<div class="wp-terminal">user@computer:$ sudo apt-get install php5-cgi<br/></div>

</li>
<li>buat file /etc/default/php-fastcgi

<div class="wp-terminal">user@computer:$ sudo vim /etc/default/php-fastcgi<br/>START=yes<br/><br/># Which user runs PHP? (default: www-data)<br/>EXEC_AS_USER=www-data<br/><br/># Host and TCP port for FASTCGI-Listener (default: localhost:9000)<br/>FCGI_HOST=localhost<br/>FCGI_PORT=8888<br/><br/># Environment variables, which are processed by PHP<br/>PHP_FCGI_CHILDREN=4<br/>PHP_FCGI_MAX_REQUESTS=1000<br/></div>

<p><span id="more-691"></span></li>
<li>buat file /etc/init.d/php-fastcgi

<div class="wp-terminal">user@computer:$ sudo vim /etc/init.d/php-fastcgi<br/>#! /bin/bash<br/>### BEGIN INIT INFO<br/># Provides:          php-fastcgi<br/># Required-Start:    $all<br/># Required-Stop:     $all<br/># Default-Start:     2 3 4 5<br/># Default-Stop:      0 1 6<br/># Short-Description: Start and stop php-cgi in external FASTCGI mode<br/># Description:       Start and stop php-cgi in external FASTCGI mode<br/>### END INIT INFO<br/><br/># Author: Kurt Zankl<br/><br/># Do NOT "set -e"<br/><br/>PATH=/sbin:/usr/sbin:/bin:/usr/bin<br/>DESC="php-cgi in external FASTCGI mode"<br/>NAME=php-fastcgi<br/>DAEMON=/usr/bin/php-cgi<br/>PIDFILE=/var/run/$NAME.pid<br/>SCRIPTNAME=/etc/init.d/$NAME<br/>PHP_CONFIG_FILE=/etc/php5/cgi/php.ini<br/><br/># Exit if the package is not installed<br/>[ -x "$DAEMON" ] || exit 0<br/><br/># Read configuration variable file if it is present<br/>[ -r /etc/default/$NAME ] &amp;&amp; . /etc/default/$NAME<br/><br/># Load the VERBOSE setting and other rcS variables<br/>. /lib/init/vars.sh<br/><br/># Define LSB log_* functions.<br/># Depend on lsb-base (&gt;= 3.0-6) to ensure that this file is present.<br/>. /lib/lsb/init-functions<br/><br/># If the daemon is not enabled, give the user a warning and then exit,<br/># unless we are stopping the daemon<br/>if [ "$START" != "yes" -a "$1" != "stop" ]; then<br/>log_warning_msg "To enable $NAME, edit /etc/default/$NAME and set START=yes"<br/>exit 0<br/>fi<br/><br/># Process configuration<br/>export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS<br/>DAEMON_ARGS="-q -b $FCGI_HOST:$FCGI_PORT -c $PHP_CONFIG_FILE"<br/><br/>do_start()<br/>{<br/># Return<br/>#   0 if daemon has been started<br/>#   1 if daemon was already running<br/>#   2 if daemon could not be started<br/>start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test &gt; /dev/null \<br/>|| return 1<br/>start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \<br/>--background --make-pidfile --chuid $EXEC_AS_USER --startas $DAEMON -- \<br/>$DAEMON_ARGS \<br/>|| return 2<br/><br/>}<br/><br/>do_stop()<br/>{<br/># Return<br/>#   0 if daemon has been stopped<br/>#   1 if daemon was already stopped<br/>#   2 if daemon could not be stopped<br/>#   other if a failure occurred<br/>start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE &gt; /dev/null # --name $DAEMON<br/>RETVAL="$?"<br/>[ "$RETVAL" = 2 ] &amp;&amp; return 2<br/># Wait for children to finish too if this is a daemon that forks<br/># and if the daemon is only ever run from this initscript.<br/># If the above conditions are not satisfied then add some other code<br/># that waits for the process to drop all resources that could be<br/># needed by services started subsequently.  A last resort is to<br/># sleep for some time.<br/>start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON<br/>[ "$?" = 2 ] &amp;&amp; return 2<br/># Many daemons don’t delete their pidfiles when they exit.<br/>rm -f $PIDFILE<br/>return "$RETVAL"<br/>}<br/><br/>case "$1" in<br/>start)<br/>[ "$VERBOSE" != no ] &amp;&amp; log_daemon_msg "Starting $DESC" "$NAME"<br/>do_start<br/>case "$?" in<br/>0|1) [ "$VERBOSE" != no ] &amp;&amp; log_end_msg 0 ;;<br/>2) [ "$VERBOSE" != no ] &amp;&amp; log_end_msg 1 ;;<br/>esac<br/>;;<br/>stop)<br/>[ "$VERBOSE" != no ] &amp;&amp; log_daemon_msg "Stopping $DESC" "$NAME"<br/>do_stop<br/>case "$?" in<br/>0|1) [ "$VERBOSE" != no ] &amp;&amp; log_end_msg 0 ;;<br/>2) [ "$VERBOSE" != no ] &amp;&amp; log_end_msg 1 ;;<br/>esac<br/>;;<br/>restart|force-reload)<br/>log_daemon_msg "Restarting $DESC" "$NAME"<br/>do_stop<br/>case "$?" in<br/>0|1)<br/>do_start<br/>case "$?" in<br/>0) log_end_msg 0 ;;<br/>1) log_end_msg 1 ;; # Old process is still running<br/>*) log_end_msg 1 ;; # Failed to start<br/>esac<br/>;;<br/>*)<br/># Failed to stop<br/>log_end_msg 1<br/>;;<br/>esac<br/>;;<br/>*)<br/>echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" &gt;&amp;2<br/>exit 3<br/>;;<br/>esac<br/></div>

</li>
<li>setting permission agar bisa dieksekusi

<div class="wp-terminal">user@computer:$ sudo chmod 755 /etc/init.d/php-fastcgi<br/></div>

</li>
<li>contoh konfigurasi vhost

<div class="wp-terminal">user@computer:$ sudo less /etc/nginx/sites-available/sarunkgenk.com<br/>server {<br/>listen      *:80;<br/>server_name  sarunkgenk.com www.sarunkgenk.com *.sarunkgenk.com;<br/>access_log /var/log/nginx/access_sarunkgenk.log;<br/>error_log /var/log/nginx/error_sarunkgenk.log;<br/>location ~* ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {<br/>root /home/arditto/wordpress-mu/;<br/>expires 30d;<br/>break;<br/>}<br/>location / {<br/>root   /home/arditto/wordpress-mu/;<br/>index  index.php index.html index.htm;<br/>if (!-e $request_filename) {<br/>rewrite ^.+/?(/wp-.*) $1 last;<br/>rewrite ^.+/?(/.*\.php)$ $1 last;<br/>rewrite ^(.+)$ /index.php?q=$1 last;<br/>}<br/><br/>fastcgi_pass   127.0.0.1:8888;<br/>fastcgi_index  index.php;<br/>fastcgi_param  SCRIPT_FILENAME /home/arditto/wordpress-mu$fastcgi_script_name;<br/>include        /etc/nginx/fastcgi_params;<br/>}<br/>}<br/></div>

</li>
<li>jalankan php dalam mode fastcgi

<div class="wp-terminal">user@computer:$ sudo /etc/init.d/php-fastcgi start<br/></div>

</li>
<li>supaya proses no 6 dijalankan otomatis saat booting, jalankan perintah :

<div class="wp-terminal">user@computer:$ sudo update-rc.d php-fastcgi defaults<br/></div>

</li>
</ol>
<p>source : <a href="http://ngadimin.com/2009/07/11/instalasi-php-sebagai-fastcgi-di-nginx/" target="_blank">http://ngadimin.com/2009/07/11/instalasi-php-sebagai-fastcgi-di-nginx/</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 184px; width: 1px; height: 1px;">
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family: monospace;"><span style="color: #666666; font-style: italic;">#! /bin/bash</span>
<span style="color: #666666; font-style: italic;">### BEGIN INIT INFO</span>
<span style="color: #666666; font-style: italic;"># Provides:          php-fastcgi</span>
<span style="color: #666666; font-style: italic;"># Required-Start:    $all</span>
<span style="color: #666666; font-style: italic;"># Required-Stop:     $all</span>
<span style="color: #666666; font-style: italic;"># Default-Start:     2 3 4 5</span>
<span style="color: #666666; font-style: italic;"># Default-Stop:      0 1 6</span>
<span style="color: #666666; font-style: italic;"># Short-Description: Start and stop php-cgi in external FASTCGI mode</span>
<span style="color: #666666; font-style: italic;"># Description:       Start and stop php-cgi in external FASTCGI mode</span>
<span style="color: #666666; font-style: italic;">### END INIT INFO</span>

<span style="color: #666666; font-style: italic;"># Author: Kurt Zankl</span>

<span style="color: #666666; font-style: italic;"># Do NOT "set -e"</span>

<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #007800;">DESC</span>=<span style="color: #ff0000;">"php-cgi in external FASTCGI mode"</span>
<span style="color: #007800;">NAME</span>=php-fastcgi
<span style="color: #007800;">DAEMON</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php-cgi
<span style="color: #007800;">PIDFILE</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>.pid
<span style="color: #007800;">SCRIPTNAME</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>
<span style="color: #007800;">PHP_CONFIG_FILE</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php5<span style="color: #000000; font-weight: bold;">/</span>cgi<span style="color: #000000; font-weight: bold;">/</span>php.ini

<span style="color: #666666; font-style: italic;"># Exit if the package is not installed</span>
<span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #660033;">-x</span> <span style="color: #ff0000;">"<span style="color: #007800;">$DAEMON</span>"</span> <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>

<span style="color: #666666; font-style: italic;"># Read configuration variable file if it is present</span>
<span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #660033;">-r</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span> <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> . <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>default<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$NAME</span>

<span style="color: #666666; font-style: italic;"># Load the VERBOSE setting and other rcS variables</span>
. <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>init<span style="color: #000000; font-weight: bold;">/</span>vars.sh

<span style="color: #666666; font-style: italic;"># Define LSB log_* functions.</span>
<span style="color: #666666; font-style: italic;"># Depend on lsb-base (&gt;= 3.0-6) to ensure that this file is present.</span>
. <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>lsb<span style="color: #000000; font-weight: bold;">/</span>init-functions

<span style="color: #666666; font-style: italic;"># If the daemon is not enabled, give the user a warning and then exit,</span>
<span style="color: #666666; font-style: italic;"># unless we are stopping the daemon</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$START</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">"yes"</span> <span style="color: #660033;">-a</span> <span style="color: #ff0000;">"$1"</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">"stop"</span> <span style="color: #7a0874; font-weight: bold;">]</span>; <span style="color: #000000; font-weight: bold;">then</span>
        log_warning_msg <span style="color: #ff0000;">"To enable <span style="color: #007800;">$NAME</span>, edit /etc/default/<span style="color: #007800;">$NAME</span> and set START=yes"</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span>
<span style="color: #000000; font-weight: bold;">fi</span>

<span style="color: #666666; font-style: italic;"># Process configuration</span>
<span style="color: #7a0874; font-weight: bold;">export</span> PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS
<span style="color: #007800;">DAEMON_ARGS</span>=<span style="color: #ff0000;">"-q -b <span style="color: #007800;">$FCGI_HOST</span>:<span style="color: #007800;">$FCGI_PORT</span> -c <span style="color: #007800;">$PHP_CONFIG_FILE</span>"</span>

do_start<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #7a0874; font-weight: bold;">)</span>
<span style="color: #7a0874; font-weight: bold;">{</span>
        <span style="color: #666666; font-style: italic;"># Return</span>
        <span style="color: #666666; font-style: italic;">#   0 if daemon has been started</span>
        <span style="color: #666666; font-style: italic;">#   1 if daemon was already running</span>
        <span style="color: #666666; font-style: italic;">#   2 if daemon could not be started</span>
        start-stop-daemon <span style="color: #660033;">--start</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> <span style="color: #007800;">$PIDFILE</span> <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span> <span style="color: #660033;">--test</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null \
                <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">1</span>
        start-stop-daemon <span style="color: #660033;">--start</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--pidfile</span> <span style="color: #007800;">$PIDFILE</span> <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span> \
                <span style="color: #660033;">--background</span> <span style="color: #660033;">--make-pidfile</span> <span style="color: #660033;">--chuid</span> <span style="color: #007800;">$EXEC_AS_USER</span> <span style="color: #660033;">--startas</span> <span style="color: #007800;">$DAEMON</span> <span style="color: #660033;">--</span> \
                <span style="color: #007800;">$DAEMON_ARGS</span> \
                <span style="color: #000000; font-weight: bold;">||</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">2</span>

<span style="color: #7a0874; font-weight: bold;">}</span>

do_stop<span style="color: #7a0874; font-weight: bold;">(</span><span style="color: #7a0874; font-weight: bold;">)</span>
<span style="color: #7a0874; font-weight: bold;">{</span>
        <span style="color: #666666; font-style: italic;"># Return</span>
        <span style="color: #666666; font-style: italic;">#   0 if daemon has been stopped</span>
        <span style="color: #666666; font-style: italic;">#   1 if daemon was already stopped</span>
        <span style="color: #666666; font-style: italic;">#   2 if daemon could not be stopped</span>
        <span style="color: #666666; font-style: italic;">#   other if a failure occurred</span>
        start-stop-daemon <span style="color: #660033;">--stop</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--retry</span>=TERM<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">30</span><span style="color: #000000; font-weight: bold;">/</span>KILL<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span> <span style="color: #660033;">--pidfile</span> <span style="color: #007800;">$PIDFILE</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #666666; font-style: italic;"># --name $DAEMON</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #ff0000;">"$?"</span>
        <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$RETVAL</span>"</span> = <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">2</span>
        <span style="color: #666666; font-style: italic;"># Wait for children to finish too if this is a daemon that forks</span>
        <span style="color: #666666; font-style: italic;"># and if the daemon is only ever run from this initscript.</span>
        <span style="color: #666666; font-style: italic;"># If the above conditions are not satisfied then add some other code</span>
        <span style="color: #666666; font-style: italic;"># that waits for the process to drop all resources that could be</span>
        <span style="color: #666666; font-style: italic;"># needed by services started subsequently.  A last resort is to</span>
        <span style="color: #666666; font-style: italic;"># sleep for some time.</span>
        start-stop-daemon <span style="color: #660033;">--stop</span> <span style="color: #660033;">--quiet</span> <span style="color: #660033;">--oknodo</span> <span style="color: #660033;">--retry</span>=<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">30</span><span style="color: #000000; font-weight: bold;">/</span>KILL<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">5</span> <span style="color: #660033;">--exec</span> <span style="color: #007800;">$DAEMON</span>
        <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"$?"</span> = <span style="color: #000000;">2</span> <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #000000;">2</span>
        <span style="color: #666666; font-style: italic;"># Many daemons don’t delete their pidfiles when they exit.</span>
        <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #007800;">$PIDFILE</span>
        <span style="color: #7a0874; font-weight: bold;">return</span> <span style="color: #ff0000;">"<span style="color: #007800;">$RETVAL</span>"</span>
<span style="color: #7a0874; font-weight: bold;">}</span>

<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">"$1"</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">)</span>
        <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$VERBOSE</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_daemon_msg <span style="color: #ff0000;">"Starting <span style="color: #007800;">$DESC</span>"</span> <span style="color: #ff0000;">"<span style="color: #007800;">$NAME</span>"</span>
        do_start
        <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">"$?"</span> <span style="color: #000000; font-weight: bold;">in</span>
                <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$VERBOSE</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">;;</span>
                <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$VERBOSE</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">esac</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">)</span>
        <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$VERBOSE</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_daemon_msg <span style="color: #ff0000;">"Stopping <span style="color: #007800;">$DESC</span>"</span> <span style="color: #ff0000;">"<span style="color: #007800;">$NAME</span>"</span>
        do_stop
        <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">"$?"</span> <span style="color: #000000; font-weight: bold;">in</span>
                <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$VERBOSE</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">;;</span>
                <span style="color: #000000;">2</span><span style="color: #7a0874; font-weight: bold;">)</span> <span style="color: #7a0874; font-weight: bold;">[</span> <span style="color: #ff0000;">"<span style="color: #007800;">$VERBOSE</span>"</span> <span style="color: #000000; font-weight: bold;">!</span>= no <span style="color: #7a0874; font-weight: bold;">]</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> log_end_msg <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">esac</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  restart<span style="color: #000000; font-weight: bold;">|</span>force-reload<span style="color: #7a0874; font-weight: bold;">)</span>
        log_daemon_msg <span style="color: #ff0000;">"Restarting <span style="color: #007800;">$DESC</span>"</span> <span style="color: #ff0000;">"<span style="color: #007800;">$NAME</span>"</span>
        do_stop
        <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">"$?"</span> <span style="color: #000000; font-weight: bold;">in</span>
          <span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">)</span>
                do_start
                <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">"$?"</span> <span style="color: #000000; font-weight: bold;">in</span>
                        <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">)</span> log_end_msg <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">;;</span>
                        <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">)</span> log_end_msg <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">;;</span> <span style="color: #666666; font-style: italic;"># Old process is still running</span>
                        <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">)</span> log_end_msg <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">;;</span> <span style="color: #666666; font-style: italic;"># Failed to start</span>
                <span style="color: #000000; font-weight: bold;">esac</span>
                <span style="color: #000000; font-weight: bold;">;;</span>
          <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">)</span>
                <span style="color: #666666; font-style: italic;"># Failed to stop</span>
                log_end_msg <span style="color: #000000;">1</span>
                <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #000000; font-weight: bold;">esac</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">)</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">"Usage: <span style="color: #007800;">$SCRIPTNAME</span> {start|stop|restart|force-reload}"</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">2</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">3</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">esac</span></pre>
</div>
</div>
</div>
<p class="fbconnect_share"><fb:share-button class="url" href="http://cuplis.net/2009/10/how-to-configure-php-as-fastcgi-on-nginx/" /></p>
<div class="sociable">
<div class="sociable_tagline">
<strong>Bookmarks:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcuplis.net%2F2009%2F10%2Fhow-to-configure-php-as-fastcgi-on-nginx%2F&amp;t=how%20to%20configure%20php%20as%20fastcgi%20on%20nginx" title="Facebook"><img src="http://cuplis.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcuplis.net%2F2009%2F10%2Fhow-to-configure-php-as-fastcgi-on-nginx%2F&amp;title=how%20to%20configure%20php%20as%20fastcgi%20on%20nginx&amp;annotation=%0D%0A%09install%20php%0D%0Asudo%20apt-get%20install%20php5-cgi%0D%0A%0D%0A%09buat%20file%20%2Fetc%2Fdefault%2Fphp-fastcgi%0D%0Asudo%20vim%20%2Fetc%2Fdefault%2Fphp-fastcgi%0D%0ASTART%3Dyes%0D%0A%0D%0A%23%20Which%20user%20runs%20PHP%3F%20%28default%3A%20www-data%29%0D%0AEXEC_AS_USER%3Dwww-data%0D%0A%0D%0A%23%20Host%20and%20TCP%20port%20for%20FASTCGI-Listener%20%28defau" title="Google Bookmarks"><img src="http://cuplis.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcuplis.net%2F2009%2F10%2Fhow-to-configure-php-as-fastcgi-on-nginx%2F&amp;title=how%20to%20configure%20php%20as%20fastcgi%20on%20nginx&amp;bodytext=%0D%0A%09install%20php%0D%0Asudo%20apt-get%20install%20php5-cgi%0D%0A%0D%0A%09buat%20file%20%2Fetc%2Fdefault%2Fphp-fastcgi%0D%0Asudo%20vim%20%2Fetc%2Fdefault%2Fphp-fastcgi%0D%0ASTART%3Dyes%0D%0A%0D%0A%23%20Which%20user%20runs%20PHP%3F%20%28default%3A%20www-data%29%0D%0AEXEC_AS_USER%3Dwww-data%0D%0A%0D%0A%23%20Host%20and%20TCP%20port%20for%20FASTCGI-Listener%20%28defau" title="Digg"><img src="http://cuplis.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fcuplis.net%2F2009%2F10%2Fhow-to-configure-php-as-fastcgi-on-nginx%2F&amp;title=how%20to%20configure%20php%20as%20fastcgi%20on%20nginx&amp;source=coretan+si+cuplis+learn+the+way%2C+define+your+own+way&amp;summary=%0D%0A%09install%20php%0D%0Asudo%20apt-get%20install%20php5-cgi%0D%0A%0D%0A%09buat%20file%20%2Fetc%2Fdefault%2Fphp-fastcgi%0D%0Asudo%20vim%20%2Fetc%2Fdefault%2Fphp-fastcgi%0D%0ASTART%3Dyes%0D%0A%0D%0A%23%20Which%20user%20runs%20PHP%3F%20%28default%3A%20www-data%29%0D%0AEXEC_AS_USER%3Dwww-data%0D%0A%0D%0A%23%20Host%20and%20TCP%20port%20for%20FASTCGI-Listener%20%28defau" title="LinkedIn"><img src="http://cuplis.net/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=how%20to%20configure%20php%20as%20fastcgi%20on%20nginx%20-%20http%3A%2F%2Fcuplis.net%2F2009%2F10%2Fhow-to-configure-php-as-fastcgi-on-nginx%2F" title="Twitter"><img src="http://cuplis.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://cuplis.net/2009/10/how-to-install-and-configure-nginx-webserver-on-ubuntu/' rel='bookmark' title='Permanent Link: how to install and configure nginx webserver on ubuntu'>how to install and configure nginx webserver on ubuntu</a> <small>caranya cukup mudah : install nginx user@computer:$ sudo apt-get install...</small></li>
<li><a href='http://cuplis.net/2009/09/how-to-install-and-configure-dhcp-server/' rel='bookmark' title='Permanent Link: how to install and configure dhcp server'>how to install and configure dhcp server</a> <small>salah satu cara untuk configure dhcp server adalah sbb :...</small></li>
<li><a href='http://cuplis.net/2009/10/how-to-install-wordpress-mu-on-nginx/' rel='bookmark' title='Permanent Link: how to install wordpress mu on nginx'>how to install wordpress mu on nginx</a> <small>setting dns server tambahkan zone sarunkgenk.com di file /etc/bind/named.conf user@computer:$...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://cuplis.net/2009/10/how-to-configure-php-as-fastcgi-on-nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>captcha security images</title>
		<link>http://cuplis.net/2008/01/captcha-security-images/</link>
		<comments>http://cuplis.net/2008/01/captcha-security-images/#comments</comments>
		<pubDate>Sat, 19 Jan 2008 03:45:09 +0000</pubDate>
		<dc:creator>cuplis</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://cuplis.net/?p=605</guid>
		<description><![CDATA[Sebagian besar dari programmer pasti sudah mengetahui, bahkan sudah banyak yang mampu membuat kode keamanan untuk menangani spam atau biasa dikenal sebagai Completely Automated Public Turing test to tell Computers and Humans Apart (Captcha) :thumbs .  Captcha berfungsi sebagai penguji otomatis untuk membedakan antara komputer dan manusia. Algoritma CAPTCHA ini digunakan untuk melawan spambot, [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Sebagian besar dari programmer pasti sudah mengetahui, bahkan sudah banyak yang mampu membuat kode keamanan untuk menangani spam atau biasa dikenal sebagai Completely Automated Public Turing test to tell Computers and Humans Apart <em>(Captcha) :thumbs . </em><em> <a title="Captcha" href="http://en.wikipedia.org/wiki/Captcha" target="_blank">Captcha</a></em> berfungsi sebagai penguji otomatis untuk membedakan antara komputer dan manusia. Algoritma CAPTCHA ini digunakan untuk melawan spambot, yakni sebuah script yang menjelajahi beberapa aplikasi forum diskusi, shoutbox, atau guestbook dan melakukan spamming di sana.<em> Captcha</em> bisa ditemui hampir di semua website, misalnya saja saat registrasi email pada yahoo, google atau yang lainnya.</p>
<p>Pada kesempatan kali ini saya akan memberikan satu contoh mudah dalam membuat captcha. Proses pertama adalah membuat satu file php yang berisi script berikut :</p>
<p>File : captcha.php</p>
<blockquote><p>&lt;?php<br />
session_start();<br />
$outputcharacters = 6;<br />
$range = &#8220;2347ABCDEFGHJKLMNPRTVWXY&#8221;;<br />
$i = 0;<br />
while ($i &lt; $outputcharacters)<br />
{<br />
$code .= substr($range, mt_rand(0, strlen($range)-1), 1);<br />
$i++;<br />
}<br />
$_SESSION["security_code"] = $code;</p>
<p>//simple captcha just create image.<br />
header(&#8220;Content-type: image/png&#8221;);</p>
<p>$im = imagecreate(60, 20);</p>
<p>// black background and orange text<br />
$bg = imagecolorallocate($im, 0, 0, 0);<br />
$textcolor = imagecolorallocate($im, 242, 193, 0);</p>
<p>// write the string at the middle<br />
imagestring($im, 5, 3, 2, $code, $textcolor);<br />
imagepng($im);<br />
imagedestroy($im);</p>
<p>?&gt;</p></blockquote>
<p>File diatas akan dipakai untuk <em>create-image-dynamic</em> berdasarkan karakter2 yang ada pada variable range <em>($range) </em>secara random yang kemudian di simpan pada session<em>.</em> Oleh karena itu, pada saat pengisian form at least kita harus menampilkan <em>image-dinamic</em> tersebut.  Misalnya seperti ini :</p>
<p>File : index.php</p>
<blockquote><p>&lt;?php<br />
echo &#8221;<br />
&lt;form action=action.php method=post&gt;<br />
Pesan: &lt;input type=text name=message&gt;&lt;br&gt;<br />
&lt;img src=captcha.php&gt;&lt;br&gt;<br />
Security Code: &lt;input id=security_code name=security_code type=text&gt;&lt;br&gt;<br />
&lt;input type=submit name=submit value=Submit&gt;<br />
&lt;/form&gt;&#8221;;<br />
?&gt;</p></blockquote>
<p>Sedangkan pada proses berikutnya adalah validasi session dengan kode yang dikirim.</p>
<p>File : action.php</p>
<blockquote><p>&lt;?php<br />
session_start();</p>
<p>if( isset($_POST['submit']))<br />
{<br />
if(($_SESSION['security_code'] == $_POST['security_code']) &amp;&amp;         (!empty($_SESSION['security_code'])) )<br />
{<br />
echo &#8216;Terimakasih Pesan anda:  &#8220;&#8216;.$_POST['message'].&#8217;&#8221;&#8216;;<br />
}<br />
else<br />
{<br />
echo &#8216;Sorry, anda memasukkan security code yang salah&lt;br /&gt;&#8217;;<br />
include &#8220;index.php&#8221;;<br />
}<br />
}<br />
else<br />
{<br />
include &#8220;index.php&#8221;;<br />
}<br />
?&gt;</p></blockquote>
<p class="fbconnect_share"><fb:share-button class="url" href="http://cuplis.net/2008/01/captcha-security-images/" /></p>
<div class="sociable">
<div class="sociable_tagline">
<strong>Bookmarks:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcuplis.net%2F2008%2F01%2Fcaptcha-security-images%2F&amp;t=captcha%20security%20images" title="Facebook"><img src="http://cuplis.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcuplis.net%2F2008%2F01%2Fcaptcha-security-images%2F&amp;title=captcha%20security%20images&amp;annotation=Sebagian%20besar%20dari%20programmer%20pasti%20sudah%20mengetahui%2C%20bahkan%20sudah%20banyak%20yang%20mampu%20membuat%20kode%20keamanan%20untuk%20menangani%20spam%20atau%20biasa%20dikenal%20sebagai%20Completely%20Automated%20Public%20Turing%20test%20to%20tell%20Computers%20and%20Humans%20Apart%20%28Captcha%29%20%3Athumbs%20." title="Google Bookmarks"><img src="http://cuplis.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcuplis.net%2F2008%2F01%2Fcaptcha-security-images%2F&amp;title=captcha%20security%20images&amp;bodytext=Sebagian%20besar%20dari%20programmer%20pasti%20sudah%20mengetahui%2C%20bahkan%20sudah%20banyak%20yang%20mampu%20membuat%20kode%20keamanan%20untuk%20menangani%20spam%20atau%20biasa%20dikenal%20sebagai%20Completely%20Automated%20Public%20Turing%20test%20to%20tell%20Computers%20and%20Humans%20Apart%20%28Captcha%29%20%3Athumbs%20." title="Digg"><img src="http://cuplis.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fcuplis.net%2F2008%2F01%2Fcaptcha-security-images%2F&amp;title=captcha%20security%20images&amp;source=coretan+si+cuplis+learn+the+way%2C+define+your+own+way&amp;summary=Sebagian%20besar%20dari%20programmer%20pasti%20sudah%20mengetahui%2C%20bahkan%20sudah%20banyak%20yang%20mampu%20membuat%20kode%20keamanan%20untuk%20menangani%20spam%20atau%20biasa%20dikenal%20sebagai%20Completely%20Automated%20Public%20Turing%20test%20to%20tell%20Computers%20and%20Humans%20Apart%20%28Captcha%29%20%3Athumbs%20." title="LinkedIn"><img src="http://cuplis.net/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=captcha%20security%20images%20-%20http%3A%2F%2Fcuplis.net%2F2008%2F01%2Fcaptcha-security-images%2F" title="Twitter"><img src="http://cuplis.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://cuplis.net/2008/01/captcha-security-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>create csv file</title>
		<link>http://cuplis.net/2007/12/create-csv-file/</link>
		<comments>http://cuplis.net/2007/12/create-csv-file/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 07:57:10 +0000</pubDate>
		<dc:creator>cuplis</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://cuplis.net/?p=612</guid>
		<description><![CDATA[Berikut ini adalah contoh script php yang bisa dipakai jika kita ingin membuat file CSV. Bisa juga dikombinasikan dengan data2 yang ada di dalam database.
&#60;?php
$list = array (
&#8216;aaa,bbb,ccc,dddd&#8217;,
&#8216;123,456,789&#8242;,
&#8216;&#8221;aaa&#8221;,&#8221;bbb&#8221;&#8216;
);
$fp = fopen(&#8216;file.csv&#8217;, &#8216;w&#8217;);
foreach ($list as $line) {
fputcsv($fp, split(&#8216;,&#8217;, $line));
}
fclose($fp);
?&#62;



Bookmarks:


	
	
	
	
	




Related posts:ubuntu ssh-copy-id : setting ssh tanpa password ﻿﻿﻿﻿﻿sebenernya proses ssh ke mirror dapat dipercepat dengan tanpa password....

Related posts [...]


Related posts:<ol><li><a href='http://cuplis.net/2010/04/ubuntu-ssh-copy-id-setting-ssh-tanpa-password/' rel='bookmark' title='Permanent Link: ubuntu ssh-copy-id : setting ssh tanpa password'>ubuntu ssh-copy-id : setting ssh tanpa password</a> <small>﻿﻿﻿﻿﻿sebenernya proses ssh ke mirror dapat dipercepat dengan tanpa password....</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Berikut ini adalah contoh script php yang bisa dipakai jika kita ingin membuat file CSV. Bisa juga dikombinasikan dengan data2 yang ada di dalam database.</p>
<blockquote><p>&lt;?php</p>
<p>$list = array (<br />
&#8216;aaa,bbb,ccc,dddd&#8217;,<br />
&#8216;123,456,789&#8242;,<br />
&#8216;&#8221;aaa&#8221;,&#8221;bbb&#8221;&#8216;<br />
);</p>
<p>$fp = fopen(&#8216;file.csv&#8217;, &#8216;w&#8217;);</p>
<p>foreach ($list as $line) {<br />
fputcsv($fp, split(&#8216;,&#8217;, $line));<br />
}</p>
<p>fclose($fp);</p>
<p>?&gt;</p></blockquote>
<p class="fbconnect_share"><fb:share-button class="url" href="http://cuplis.net/2007/12/create-csv-file/" /></p>
<div class="sociable">
<div class="sociable_tagline">
<strong>Bookmarks:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fcreate-csv-file%2F&amp;t=create%20csv%20file" title="Facebook"><img src="http://cuplis.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fcreate-csv-file%2F&amp;title=create%20csv%20file&amp;annotation=Berikut%20ini%20adalah%20contoh%20script%20php%20yang%20bisa%20dipakai%20jika%20kita%20ingin%20membuat%20file%20CSV.%20Bisa%20juga%20dikombinasikan%20dengan%20data2%20yang%20ada%20di%20dalam%20database.%0D%0A%26lt%3B%3Fphp%0D%0A%0D%0A%24list%20%3D%20array%20%28%0D%0A%27aaa%2Cbbb%2Cccc%2Cdddd%27%2C%0D%0A%27123%2C456%2C789%27%2C%0D%0A%27%22aaa%22%2C%22bbb%22%27%0D%0A%29%3B%0D%0A%0D%0A%24fp%20%3D%20f" title="Google Bookmarks"><img src="http://cuplis.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fcreate-csv-file%2F&amp;title=create%20csv%20file&amp;bodytext=Berikut%20ini%20adalah%20contoh%20script%20php%20yang%20bisa%20dipakai%20jika%20kita%20ingin%20membuat%20file%20CSV.%20Bisa%20juga%20dikombinasikan%20dengan%20data2%20yang%20ada%20di%20dalam%20database.%0D%0A%26lt%3B%3Fphp%0D%0A%0D%0A%24list%20%3D%20array%20%28%0D%0A%27aaa%2Cbbb%2Cccc%2Cdddd%27%2C%0D%0A%27123%2C456%2C789%27%2C%0D%0A%27%22aaa%22%2C%22bbb%22%27%0D%0A%29%3B%0D%0A%0D%0A%24fp%20%3D%20f" title="Digg"><img src="http://cuplis.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fcreate-csv-file%2F&amp;title=create%20csv%20file&amp;source=coretan+si+cuplis+learn+the+way%2C+define+your+own+way&amp;summary=Berikut%20ini%20adalah%20contoh%20script%20php%20yang%20bisa%20dipakai%20jika%20kita%20ingin%20membuat%20file%20CSV.%20Bisa%20juga%20dikombinasikan%20dengan%20data2%20yang%20ada%20di%20dalam%20database.%0D%0A%26lt%3B%3Fphp%0D%0A%0D%0A%24list%20%3D%20array%20%28%0D%0A%27aaa%2Cbbb%2Cccc%2Cdddd%27%2C%0D%0A%27123%2C456%2C789%27%2C%0D%0A%27%22aaa%22%2C%22bbb%22%27%0D%0A%29%3B%0D%0A%0D%0A%24fp%20%3D%20f" title="LinkedIn"><img src="http://cuplis.net/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=create%20csv%20file%20-%20http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fcreate-csv-file%2F" title="Twitter"><img src="http://cuplis.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://cuplis.net/2010/04/ubuntu-ssh-copy-id-setting-ssh-tanpa-password/' rel='bookmark' title='Permanent Link: ubuntu ssh-copy-id : setting ssh tanpa password'>ubuntu ssh-copy-id : setting ssh tanpa password</a> <small>﻿﻿﻿﻿﻿sebenernya proses ssh ke mirror dapat dipercepat dengan tanpa password....</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://cuplis.net/2007/12/create-csv-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>upload file ke server pada PHP</title>
		<link>http://cuplis.net/2007/12/upload-file-ke-server-pada-php/</link>
		<comments>http://cuplis.net/2007/12/upload-file-ke-server-pada-php/#comments</comments>
		<pubDate>Sun, 16 Dec 2007 06:55:39 +0000</pubDate>
		<dc:creator>cuplis</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://cuplis.net/?p=601</guid>
		<description><![CDATA[Dalam pembuatan sebuah website interaktif tak jarang kita memanfaatkan fasilitas upload pada website tersebut. Sedangkan untuk script upload yang biasa digunakan dalam php adalah upload dengan method post. Fasilitas ini seharusnya diikuti dengan menggunakan validasi PHP dan memanipulasi sebuah fungsi, dan anda memiliki kontrol penuh untuk mengizinkan orang-orang dengan hak akses tertentu untuk melakukan proses [...]


Related posts:<ol><li><a href='http://cuplis.net/2009/09/how-to-setting-dns-server/' rel='bookmark' title='Permanent Link: how to setting dns server'>how to setting dns server</a> <small>pertama install bind9 : user@computer:$ sudo apt-get install bind9 kemudian...</small></li>
<li><a href='http://cuplis.net/2009/10/operasi-input-output/' rel='bookmark' title='Permanent Link: operasi input output'>operasi input output</a> <small>1. Proses INPUT OUTPUT Sebuah Proses memerlukan Input / Output...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Dalam pembuatan sebuah website interaktif tak jarang kita memanfaatkan fasilitas upload pada website tersebut. Sedangkan untuk script upload yang biasa digunakan dalam php adalah upload dengan method post. Fasilitas ini seharusnya diikuti dengan menggunakan validasi PHP dan memanipulasi sebuah fungsi, dan anda memiliki kontrol penuh untuk mengizinkan orang-orang dengan hak akses tertentu untuk melakukan proses upload.<br />
Sebuah form untuk file upload dapat dibuat seperti ini :</p>
<p>formupload.php</p>
<blockquote><p>&lt;!&#8211; The data encoding type, enctype, MUST be specified as below &#8211;&gt;<br />
&lt;form enctype=&#8221;multipart/form-data&#8221; action=&#8221;process.php&#8221; method=&#8221;POST&#8221;&gt;<br />
&lt;!&#8211; MAX_FILE_SIZE must precede the file input field &#8211;&gt;<br />
&lt;input type=&#8221;hidden&#8221; name=&#8221;MAX_FILE_SIZE&#8221; value=&#8221;30000&#8243; /&gt;<br />
&lt;!&#8211; Name of input element determines name in $_FILES array &#8211;&gt;<br />
Send this file: &lt;input name=&#8221;userfile&#8221; type=&#8221;file&#8221; /&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;Send File&#8221; /&gt;<br />
&lt;/form&gt;</p></blockquote>
<p>Fungsi dari hidden field MAX_FILE_SIZE adalah menyatakan kapasitas maksimal file yang akan di upload untuk dilakukan pengecekan oleh php nantinya.<br />
Pastikan pada form terdapat attribute enctype=&#8221;multipart/form-data&#8221;, jika tidak proses upload tidak akan berjalan.</p>
<p>Dengan menggunakan script $_FILE pada PHP kita dapat mengetahui beberapa keterangan mengenai file yang di upload.<br />
Keterangan yang didapat adalah sebagai berikut :</p>
<p>$_FILES['userfile']['name'] &#8211;&gt; nama file yang diupload<br />
$_FILES['userfile']['type'] &#8211;&gt; tipe file yang diupload<br />
$_FILES['userfile']['size'] &#8211;&gt; ukuran file yang diupload<br />
$_FILES['userfile']['tmp_name'] &#8211;&gt; nama file sementara(temporary) pada saat upload<br />
$_FILES['userfile']['error'] &#8211;&gt; kode error yang mungkin terjadi pada file yang diupload</p>
<p>Keterangan kode error jika :<br />
0 -&gt; tidak ada error ketika upload<br />
1 -&gt; kapasitas file melebihi yang ditentukan di php.ini(upload_max_filesize)<br />
2 -&gt; kapasitas file melebihi yang ditentukan di form html(MAX_FILE_SIZE)<br />
3 -&gt; file tidak ter upload semua(hanya terkirim sebagian)<br />
4 -&gt; tidak ada file yang di upload<br />
6 -&gt; file temporary tidak bisa ditemukan di server(bisa karena terhapus maupun cacat file)<br />
7 -&gt; gagal penyimpanan di server(bisa dikarenakan oleh permission dari server)</p>
<p>Berikut ini adalah contoh file untuk melakukan upload :</p>
<p>process.php</p>
<blockquote><p>&lt;?php</p>
<p>$uploaddir = &#8216;/var/www/uploads/&#8217;; //direktori upload file<br />
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);</p>
<p>echo &#8216;&lt;pre&gt;&#8217;;<br />
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {<br />
echo &#8220;sukses upload file!\n&#8221;;<br />
} else {<br />
echo &#8220;gagal upload file!\n&#8221;;<br />
}</p>
<p>echo &#8216;Beberapa hasil debug:&#8217;;<br />
print_r($_FILES);</p>
<p>print &#8220;&lt;/pre&gt;&#8221;;</p>
<p>?&gt;</p></blockquote>
<p>Source : PHP Manual</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://cuplis.net/2007/12/upload-file-ke-server-pada-php/" /></p>
<div class="sociable">
<div class="sociable_tagline">
<strong>Bookmarks:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  href="http://www.facebook.com/share.php?u=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fupload-file-ke-server-pada-php%2F&amp;t=upload%20file%20ke%20server%20pada%20PHP" title="Facebook"><img src="http://cuplis.net/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fupload-file-ke-server-pada-php%2F&amp;title=upload%20file%20ke%20server%20pada%20PHP&amp;annotation=Dalam%20pembuatan%20sebuah%20website%20interaktif%20tak%20jarang%20kita%20memanfaatkan%20fasilitas%20upload%20pada%20website%20tersebut.%20Sedangkan%20untuk%20script%20upload%20yang%20biasa%20digunakan%20dalam%20php%20adalah%20upload%20dengan%20method%20post.%20Fasilitas%20ini%20seharusnya%20diikuti%20dengan%20meng" title="Google Bookmarks"><img src="http://cuplis.net/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fupload-file-ke-server-pada-php%2F&amp;title=upload%20file%20ke%20server%20pada%20PHP&amp;bodytext=Dalam%20pembuatan%20sebuah%20website%20interaktif%20tak%20jarang%20kita%20memanfaatkan%20fasilitas%20upload%20pada%20website%20tersebut.%20Sedangkan%20untuk%20script%20upload%20yang%20biasa%20digunakan%20dalam%20php%20adalah%20upload%20dengan%20method%20post.%20Fasilitas%20ini%20seharusnya%20diikuti%20dengan%20meng" title="Digg"><img src="http://cuplis.net/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fupload-file-ke-server-pada-php%2F&amp;title=upload%20file%20ke%20server%20pada%20PHP&amp;source=coretan+si+cuplis+learn+the+way%2C+define+your+own+way&amp;summary=Dalam%20pembuatan%20sebuah%20website%20interaktif%20tak%20jarang%20kita%20memanfaatkan%20fasilitas%20upload%20pada%20website%20tersebut.%20Sedangkan%20untuk%20script%20upload%20yang%20biasa%20digunakan%20dalam%20php%20adalah%20upload%20dengan%20method%20post.%20Fasilitas%20ini%20seharusnya%20diikuti%20dengan%20meng" title="LinkedIn"><img src="http://cuplis.net/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  href="http://twitter.com/home?status=upload%20file%20ke%20server%20pada%20PHP%20-%20http%3A%2F%2Fcuplis.net%2F2007%2F12%2Fupload-file-ke-server-pada-php%2F" title="Twitter"><img src="http://cuplis.net/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
</ul>
</div>


<p>Related posts:<ol><li><a href='http://cuplis.net/2009/09/how-to-setting-dns-server/' rel='bookmark' title='Permanent Link: how to setting dns server'>how to setting dns server</a> <small>pertama install bind9 : user@computer:$ sudo apt-get install bind9 kemudian...</small></li>
<li><a href='http://cuplis.net/2009/10/operasi-input-output/' rel='bookmark' title='Permanent Link: operasi input output'>operasi input output</a> <small>1. Proses INPUT OUTPUT Sebuah Proses memerlukan Input / Output...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://cuplis.net/2007/12/upload-file-ke-server-pada-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
