<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: File Downloader</title>
	<atom:link href="http://bayu.freelancer.web.id/2007/09/10/file-downloader/feed/" rel="self" type="application/rss+xml" />
	<link>http://bayu.freelancer.web.id/2007/09/10/file-downloader/</link>
	<description>New knowledges every now and then</description>
	<lastBuildDate>Sun, 05 Feb 2012 08:09:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Arief Bayu Purwanto</title>
		<link>http://bayu.freelancer.web.id/2007/09/10/file-downloader/comment-page-1/#comment-11042</link>
		<dc:creator>Arief Bayu Purwanto</dc:creator>
		<pubDate>Mon, 10 Sep 2007 16:08:12 +0000</pubDate>
		<guid isPermaLink="false">http://bayu.freelancer.web.id/index.php/2007/09/10/file-downloader/#comment-11042</guid>
		<description>mumpung baru muncul.
eh...eh... ternyata bisa dibuat lebih simple, seperti ini:
[code lang=&quot;php&quot;]
&lt;?php
    function downloadFile($filepath, $filename = &#039;&#039;){
        header(&#039;Content-Type: application/octet-stream&#039;);
        header(&#039;Content-Length: &#039; . filesize($filepath));
        header(&#039;Content-Disposition: attachment; filename=&quot;&#039;.(trim($filename) == &#039;&#039;? basename($filepath) : $filename).&#039;&quot;&#039;);
        @readfile($filepath);
    }
?&gt;
[/code]
trus cara pakenya:
[code lang=&quot;php&quot;]
&lt;?php
    $fpath = &#039;/home/user/webuser/non_web_accessible_dir/file.pdf&#039;;
    
    //downloadFile($fpath);
    //     atau 
    downloadFile($fpath, &#039;nama_file_yang_baru.pdf&#039;);
?&gt;
[/code]
hihihihi, last minute hack :D</description>
		<content:encoded><![CDATA[<p>mumpung baru muncul.<br />
eh&#8230;eh&#8230; ternyata bisa dibuat lebih simple, seperti ini:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    function downloadFile($filepath, $filename = ''){
        header('Content-Type: application/octet-stream');
        header('Content-Length: ' . filesize($filepath));
        header('Content-Disposition: attachment; filename=&quot;'.(trim($filename) == ''? basename($filepath) : $filename).'&quot;');
        @readfile($filepath);
    }
?&gt;
</pre>
<p>trus cara pakenya:</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
    $fpath = '/home/user/webuser/non_web_accessible_dir/file.pdf';

    //downloadFile($fpath);
    //     atau
    downloadFile($fpath, 'nama_file_yang_baru.pdf');
?&gt;
</pre>
<p>hihihihi, last minute hack <img src='http://bayu.freelancer.web.id/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arief Bayu Purwanto</title>
		<link>http://bayu.freelancer.web.id/2007/09/10/file-downloader/comment-page-1/#comment-59819</link>
		<dc:creator>Arief Bayu Purwanto</dc:creator>
		<pubDate>Mon, 10 Sep 2007 16:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://bayu.freelancer.web.id/index.php/2007/09/10/file-downloader/#comment-59819</guid>
		<description>mumpung baru muncul.
eh...eh... ternyata bisa dibuat lebih simple, seperti ini:
[code lang=&quot;php&quot;]
&lt;?php
    function downloadFile($filepath, $filename = &#039;&#039;){
        header(&#039;Content-Type: application/octet-stream&#039;);
        header(&#039;Content-Length: &#039; . filesize($filepath));
        header(&#039;Content-Disposition: attachment; filename=&quot;&#039;.(trim($filename) == &#039;&#039;? basename($filepath) : $filename).&#039;&quot;&#039;);
        @readfile($filepath);
    }
?&gt;
[/code]
trus cara pakenya:
[code lang=&quot;php&quot;]
&lt;?php
    $fpath = &#039;/home/user/webuser/non_web_accessible_dir/file.pdf&#039;;
    
    //downloadFile($fpath);
    //     atau 
    downloadFile($fpath, &#039;nama_file_yang_baru.pdf&#039;);
?&gt;
[/code]
hihihihi, last minute hack &#058;&#068;</description>
		<content:encoded><![CDATA[<p>mumpung baru muncul.<br />
eh&#8230;eh&#8230; ternyata bisa dibuat lebih simple, seperti ini:</p>
<pre class="brush: php; title: ; notranslate">
&amp;lt;?php
    function downloadFile($filepath, $filename = ''){
        header('Content-Type: application/octet-stream');
        header('Content-Length: ' . filesize($filepath));
        header('Content-Disposition: attachment; filename=&amp;quot;'.(trim($filename) == ''? basename($filepath) : $filename).'&amp;quot;');
        @readfile($filepath);
    }
?&amp;gt;
</pre>
<p>trus cara pakenya:</p>
<pre class="brush: php; title: ; notranslate">
&amp;lt;?php
    $fpath = '/home/user/webuser/non_web_accessible_dir/file.pdf';

    //downloadFile($fpath);
    //     atau
    downloadFile($fpath, 'nama_file_yang_baru.pdf');
?&amp;gt;
</pre>
<p>hihihihi, last minute hack &#058;&#068;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: bayu.freelancer.web.id @ 2012-02-08 21:04:25 -->
