<?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>Dedy's Personal Site - Web Developer  - PHP Developer - PHP Freelancer &#187; Pemrograman</title>
	<atom:link href="http://www.geraiweb.com/wordpress/category/pemrograman/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geraiweb.com/wordpress</link>
	<description>Get to know me.</description>
	<lastBuildDate>Thu, 03 Jun 2010 05:06:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>meredirect url dengan htaccess</title>
		<link>http://www.geraiweb.com/wordpress/2009/07/14/meredirect-url-dengan-htaccess/</link>
		<comments>http://www.geraiweb.com/wordpress/2009/07/14/meredirect-url-dengan-htaccess/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 11:32:53 +0000</pubDate>
		<dc:creator>dedy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pemrograman]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.geraiweb.com/wordpress/?p=182</guid>
		<description><![CDATA[
&#60;IfModule mod_rewrite.c&#62;
RewriteEngine On
RewriteBase /
Redirect / http://www.new-address.com/
RewriteRule (.*) http://www.new-address.com/$1 [L]
&#60;/IfModule&#62;
explanation :

RewriteBase /
* untuk menentukan folder aktif u/ rewrite tersebut




Redirect / http://www.new-address.com/
*meredirect request ke folder '/' , ke alamat baru

RewriteRule (.*) http://www.new-address.com/$1 [L]
* semua request di redirect ke alamat baru (plus parameter di belakangnya)




]]></description>
			<content:encoded><![CDATA[<div>
<p><span style="font-family: 'Courier New'; line-height: 18px; white-space: pre;">&lt;IfModule mod_rewrite.c&gt;</span></p>
<pre class="alt2" dir="ltr">RewriteEngine On
RewriteBase /
Redirect / http://www.new-address.com/
RewriteRule (.*) http://www.new-address.com/$1 [L]
&lt;/IfModule&gt;</pre>
<pre class="alt2" dir="ltr">explanation :</pre>
<pre class="alt2" dir="ltr"><span id="more-182"></span></pre>
<pre class="alt2" dir="ltr">RewriteBase /</pre>
<pre class="alt2" dir="ltr">* untuk menentukan folder aktif u/ rewrite tersebut</pre>
<pre class="alt2" dir="ltr">
<pre class="alt2" dir="ltr">
<pre class="alt2" dir="ltr">
<pre class="alt2" dir="ltr"></pre>
<pre class="alt2" dir="ltr">Redirect / http://www.new-address.com/</pre>
<pre class="alt2" dir="ltr">*meredirect request ke folder '/' , ke alamat baru</pre>
<pre class="alt2" dir="ltr"></pre>
<pre class="alt2" dir="ltr">RewriteRule (.*) http://www.new-address.com/$1 [L]</pre>
<pre class="alt2" dir="ltr">* semua request di redirect ke alamat baru (plus parameter di belakangnya)</pre>
</pre>
</pre>
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.geraiweb.com/wordpress/2009/07/14/meredirect-url-dengan-htaccess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom 404 page in codeigniter</title>
		<link>http://www.geraiweb.com/wordpress/2009/06/26/custom-404-page-in-codeigniter/</link>
		<comments>http://www.geraiweb.com/wordpress/2009/06/26/custom-404-page-in-codeigniter/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 10:43:06 +0000</pubDate>
		<dc:creator>dedy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pemrograman]]></category>
		<category><![CDATA[codeigniter]]></category>

		<guid isPermaLink="false">http://www.geraiweb.com/wordpress/?p=205</guid>
		<description><![CDATA[Helo,
   I found this in the internet when I need to custom my 404 page . Because the default 404 page from codeigniter is so &#8216;default&#8217;   .
When the application can not found the page requested, it handle by the Exceptions in the codeigniter , function show_404.
You can find the file in [...]]]></description>
			<content:encoded><![CDATA[<p>Helo,</p>
<p>   I found this in the internet when I need to custom my 404 page . Because the default 404 page from codeigniter is so &#8216;default&#8217; <img src='http://www.geraiweb.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .</p>
<p>When the application can not found the page requested, it handle by the Exceptions in the codeigniter , function show_404.</p>
<p>You can find the file in the &#8216;./libraries/Exceptions.php&#8217; .</p>
<p>In order to create your own 404 page, you just need to override the function show_404($page = &#8221;) .</p>
<p>How we do that ? </p>
<p>You just need to create a file named : &#8216;MY_Exceptions.php&#8217; , and put it in the folder &#8216;./application/libraries&#8217;.</p>
<p>And the content of the file should be like this : </p>
<p><code></p>
<pre class="brush: php">
&lt;?

	class MY_Exceptions extends CI_Exceptions{

	  	public function __construct(){
	      parent::__construct();
	    }

		function show_404($page = &#039;&#039;){
			redirect(&#039;404&#039;,&#039;refresh&#039;);  // you can change this with what you want
			exit;
		}
	}
?&gt;
</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geraiweb.com/wordpress/2009/06/26/custom-404-page-in-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Difference between parsing variable and parsing reference</title>
		<link>http://www.geraiweb.com/wordpress/2009/06/24/difference-between-parsing-variable-and-parsing-reference/</link>
		<comments>http://www.geraiweb.com/wordpress/2009/06/24/difference-between-parsing-variable-and-parsing-reference/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 09:46:42 +0000</pubDate>
		<dc:creator>dedy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pemrograman]]></category>
		<category><![CDATA[parsing reference]]></category>

		<guid isPermaLink="false">http://www.geraiweb.com/wordpress/?p=187</guid>
		<description><![CDATA[I found an interesting code when I'm coding.

what  is difference between :

$_fx  = &#038;$a ;

with

$_fx  = $a ;

The first one,  we call it parsing reference, and the second one , is parsing value.

you can see the difference with this sample : ]]></description>
			<content:encoded><![CDATA[<p>I found an interesting code when I&#8217;m coding.</p>
<p>what  is difference between :</p>
<p>$_fx  = &amp;$a ;</p>
<p>with</p>
<p>$_fx  = $a ;</p>
<p>The first one,  we call it parsing reference, and the second one , is parsing value.</p>
<p>you can see the difference with this sample :</p>
<p><code>
<pre class="brush: php">
&lt;?&lt;/code&gt;&lt;/code&gt;

&lt;code&gt;&lt;code&gt; &lt;/code&gt;

&lt;code&gt;echo &quot;without reference: &lt;BR&gt;&quot;;
$a = 5;
$b = $a;

echo &quot; a : 5&lt;BR&gt;&quot;;
echo &#039;$b = $a &lt;BR&gt;&#039;;
echo &quot;${b} = ${a} &lt;BR&gt;&quot;;

for($i=1;$i&lt;5;$i++){
$b++;
echo &quot;a(${a}) | b(${b}) &lt;BR&gt;&quot;;
}

echo &quot;&lt;BR&gt;&lt;BR&gt;&quot;;

echo &quot;with reference (&amp;amp;amp;amp;) : &lt;br&gt;&quot;;

$a = 5;
$b = &amp;amp;amp;amp;$a;

echo &quot; a : 5&lt;BR&gt;&quot;;
echo &#039;$b = &amp;amp;amp;amp;$a &lt;BR&gt;&#039;;
echo &quot;${b} = ${a} &lt;BR&gt;&quot;;

for($i=1;$i&lt;5;$i++){
$b++;
echo &quot;a(${a}) | b(${b}) &lt;BR&gt;&quot;;
}

?&gt;

&lt;/code&gt;

&lt;/code&gt;

&lt;code&gt;&lt;code&gt;</pre>
<p></code></p>
<p>as you can see, using &#8216;&amp;&#8217; , the value of $a is also changed .</p>
<p>so what I get is , if you using a reference, any changes you made on the reference variable ($b) will efect the real variable ($a)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geraiweb.com/wordpress/2009/06/24/difference-between-parsing-variable-and-parsing-reference/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Mengubah strange filename ke string</title>
		<link>http://www.geraiweb.com/wordpress/2009/03/04/mengubah-strange-filename-ke-string/</link>
		<comments>http://www.geraiweb.com/wordpress/2009/03/04/mengubah-strange-filename-ke-string/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 09:33:48 +0000</pubDate>
		<dc:creator>dedy</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pemrograman]]></category>
		<category><![CDATA[php script]]></category>

		<guid isPermaLink="false">http://www.geraiweb.com/wordpress/?p=169</guid>
		<description><![CDATA[Ini gw dapet dari php.net waktu gw nyari fungsi u/ mengubah character non alphanumeric ke &#8216;-&#8217; .
Berguna u/ merename filename yg aneh2 atau hal2 lain :


&#60;?&#60;/code&#62;

&#60;code&#62; &#60;/code&#62;

&#60;code&#62;$string = &#34;d&#039;edy adhie&#38;amp;amp;%sdf\&#34;ddd)(*)@#^$*(&#38;amp;amp;)%sfsd.jpg&#34;;

echo &#34;&#60;BR&#62;&#60;BR&#62;&#34;;

echo &#34;string asli : &#34;.$string.&#34;&#60;BR&#62;&#60;BR&#62;&#34;;

echo &#34;sesudah convert : &#34;.string_to_filename($string);

function string_to_filename($word) {

$pos = strrpos($word,&#34;.&#34;);

$ext = substr($word,$pos);

$wordToReplace = substr($word,0,$pos);

&#60;span&#62; &#60;/span&#62;

&#60;span&#62; &#60;/span&#62;// only replace the filename, exclude the [...]]]></description>
			<content:encoded><![CDATA[<p>Ini gw dapet dari php.net waktu gw nyari fungsi u/ mengubah character non alphanumeric ke &#8216;-&#8217; .</p>
<p>Berguna u/ merename filename yg aneh2 atau hal2 lain :</p>
<p><code><span id="more-169"></span></p>
<pre class="brush: php">
&lt;?&lt;/code&gt;

&lt;code&gt; &lt;/code&gt;

&lt;code&gt;$string = &quot;d&#039;edy adhie&amp;amp;amp;%sdf\&quot;ddd)(*)@#^$*(&amp;amp;amp;)%sfsd.jpg&quot;;

echo &quot;&lt;BR&gt;&lt;BR&gt;&quot;;

echo &quot;string asli : &quot;.$string.&quot;&lt;BR&gt;&lt;BR&gt;&quot;;

echo &quot;sesudah convert : &quot;.string_to_filename($string);

function string_to_filename($word) {

$pos = strrpos($word,&quot;.&quot;);

$ext = substr($word,$pos);

$wordToReplace = substr($word,0,$pos);

&lt;span&gt; &lt;/span&gt;

&lt;span&gt; &lt;/span&gt;// only replace the filename, exclude the extension

$tmp = preg_replace(&#039;/\W+|\W+/&#039;, &#039;-&#039;, $wordToReplace); &lt;span&gt; &lt;/span&gt;// remove all non-alphanumeric chars at begin &amp;amp;amp; end of string

$tmp = preg_replace(&#039;/\s+/&#039;, &#039;-&#039;, $tmp); &lt;span&gt; &lt;/span&gt;// compress internal whitespace and replace with _

return strtolower(preg_replace(&#039;/\W-/&#039;, &#039;-&#039;, $tmp)).$ext; &lt;span&gt; &lt;/span&gt;// remove all non-alphanumeric chars except _ and -

}

&lt;/code&gt;

&lt;code&gt;?&gt;
</pre>
<p></code><br />
hasil nya :</p>
<blockquote><p>string asli : d&#8217;edy adhie&amp;%sdf&#8221;ddd)(*)@#^$*(&amp;)%sfsd.jpg</p>
<p>sesudah convert : d-edy-adhie-sdf-ddd-sfsd.jpg</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.geraiweb.com/wordpress/2009/03/04/mengubah-strange-filename-ke-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
