<?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: How to Use Amazon S3 &amp; PHP to Dynamically Store and Manage Files with Ease</title>
	<atom:link href="http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/feed/" rel="self" type="application/rss+xml" />
	<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/</link>
	<description>Web Development &#38; Design Tutorials</description>
	<lastBuildDate>Sun, 21 Mar 2010 04:17:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ignacio</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-235712</link>
		<dc:creator>Ignacio</dc:creator>
		<pubDate>Fri, 19 Mar 2010 10:04:49 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-235712</guid>
		<description>Hello guys, I&#039;m using this script and is working pretty nice. Now going back on the discussion about displaying the images in the browser... I got it work adding the Content-type.

Now my question is:

Should I use:
“Content-disposition: attachment; filename=filename.ext”

or specify the content-type:
&quot;Content-type: image/gif&quot;

In fact... both work. In my script I prefer to use the first one, It&#039;s going to be hard for me to get the content-type of some files in my uploader and I don&#039;t trust in PHP until we get PHP 5.3 with fileinfo.

Can anyone explain me which way is better and why?

Thanks!</description>
		<content:encoded><![CDATA[<p>Hello guys, I&#8217;m using this script and is working pretty nice. Now going back on the discussion about displaying the images in the browser&#8230; I got it work adding the Content-type.</p>
<p>Now my question is:</p>
<p>Should I use:<br />
“Content-disposition: attachment; filename=filename.ext”</p>
<p>or specify the content-type:<br />
&#8220;Content-type: image/gif&#8221;</p>
<p>In fact&#8230; both work. In my script I prefer to use the first one, It&#8217;s going to be hard for me to get the content-type of some files in my uploader and I don&#8217;t trust in PHP until we get PHP 5.3 with fileinfo.</p>
<p>Can anyone explain me which way is better and why?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-156842</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Mon, 04 Jan 2010 01:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-156842</guid>
		<description>Hey cvue,

This doesn&#039;t directly answer your question, but it might give you what you&#039;re after.

When you upload files to S3, you can specify meta information as well. So in your S3 upload script, just specify &quot;Content-disposition: attachment; filename=filename.ext&quot;. 

Best of luck.</description>
		<content:encoded><![CDATA[<p>Hey cvue,</p>
<p>This doesn&#8217;t directly answer your question, but it might give you what you&#8217;re after.</p>
<p>When you upload files to S3, you can specify meta information as well. So in your S3 upload script, just specify &#8220;Content-disposition: attachment; filename=filename.ext&#8221;. </p>
<p>Best of luck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cvue</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-147457</link>
		<dc:creator>cvue</dc:creator>
		<pubDate>Fri, 18 Dec 2009 20:26:47 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-147457</guid>
		<description>I got a question.... I&#039;ve been hacking away at this problem for what seems to be FOREVER!!! 

here is the code
-----------------------------------------------------------------
$fileID=(my orignal file name)
$uri=&quot;&quot; // i stilll have no idea what this uri is.... but i concluded that it is the path thats relative the the bucket root.

//this S3 code does not work for me..... I don&#039;t know why... gives me a fopen($fileID) error..

$fp = fopen(&quot;$fileID&quot;, &quot;wb&quot;);
 if (($object = $s3-&gt;getObject($bucket, $uri, $fp)) !== false) {
     print_r($object);
}

/*
I&#039;m trying to grab the file from S3&#039;s server, channel it into my server and output it as a Force Download, more less what I&#039;m really after is the renaming ability i can achieve with a Force Download. 
EX: (http://...../myfile.xyz) downloaded as (filenumber2-121809.zip)
*/

/*
this part of the script is my original download script and it work fine pulling the S3&#039;s http URL this is what im using right now and having trouble with.
*/
header(&#039;Content-Description: File Transfer&#039;);
header(&#039;Content-Type: application/octet-stream&#039;);
header(&#039;Content-Disposition: attachment; filename=&#039;.$filename);
header(&#039;Content-Transfer-Encoding: binary&#039;);
$expires = 60*60*24*14;
header(&quot;Pragma: public&quot;);
header(&quot;Cache-Control: maxage=&quot;.$expires);
header(&#039;Expires: &#039; . gmdate(&#039;D, d M Y H:i:s&#039;, time()+$expires) . &#039; GMT&#039;);
header(&#039;Content-Length: &#039; . filesize($URL));
ob_clean();
flush();
readfile($URL);

-------------------------------------------------------------

so where do i go from here? 

:::: The PROBLEM ::::
There is a format that seems to be having issues once downloaded, and in process to open. A QuickBooks format.

I&#039;ve also noticed that with this download script, the file-size increases by 1kb... i don&#039;t think thats natural, is it?

seems like some where in this script there is data that is not being read or something, so in turn corrupts the quick book file?? once downloaded the QB file loses its meta-data in telling which version of QB it was made.

I tested zipping the file, uploading, downloading, unzipping, and it work just fine. so it cant be my upload script, its gotta be my download script, right?

maybe.... so i tested downloading the file straight from S3&#039;s server. and it work just fine, so i concluded that it has to be the download script. but what part?

Could anyone enlighten me on whats wrong with my force download?

thanks for any help ahead of time!!</description>
		<content:encoded><![CDATA[<p>I got a question&#8230;. I&#8217;ve been hacking away at this problem for what seems to be FOREVER!!! </p>
<p>here is the code<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
$fileID=(my orignal file name)<br />
$uri=&#8221;" // i stilll have no idea what this uri is&#8230;. but i concluded that it is the path thats relative the the bucket root.</p>
<p>//this S3 code does not work for me&#8230;.. I don&#8217;t know why&#8230; gives me a fopen($fileID) error..</p>
<p>$fp = fopen(&#8220;$fileID&#8221;, &#8220;wb&#8221;);<br />
 if (($object = $s3-&gt;getObject($bucket, $uri, $fp)) !== false) {<br />
     print_r($object);<br />
}</p>
<p>/*<br />
I&#8217;m trying to grab the file from S3&#8217;s server, channel it into my server and output it as a Force Download, more less what I&#8217;m really after is the renaming ability i can achieve with a Force Download.<br />
EX: (<a href="http://...../myfile.xyz" rel="nofollow">http://&#8230;../myfile.xyz</a>) downloaded as (filenumber2-121809.zip)<br />
*/</p>
<p>/*<br />
this part of the script is my original download script and it work fine pulling the S3&#8217;s http URL this is what im using right now and having trouble with.<br />
*/<br />
header(&#8216;Content-Description: File Transfer&#8217;);<br />
header(&#8216;Content-Type: application/octet-stream&#8217;);<br />
header(&#8216;Content-Disposition: attachment; filename=&#8217;.$filename);<br />
header(&#8216;Content-Transfer-Encoding: binary&#8217;);<br />
$expires = 60*60*24*14;<br />
header(&#8220;Pragma: public&#8221;);<br />
header(&#8220;Cache-Control: maxage=&#8221;.$expires);<br />
header(&#8216;Expires: &#8216; . gmdate(&#8216;D, d M Y H:i:s&#8217;, time()+$expires) . &#8216; GMT&#8217;);<br />
header(&#8216;Content-Length: &#8216; . filesize($URL));<br />
ob_clean();<br />
flush();<br />
readfile($URL);</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>so where do i go from here? </p>
<p>:::: The PROBLEM ::::<br />
There is a format that seems to be having issues once downloaded, and in process to open. A QuickBooks format.</p>
<p>I&#8217;ve also noticed that with this download script, the file-size increases by 1kb&#8230; i don&#8217;t think thats natural, is it?</p>
<p>seems like some where in this script there is data that is not being read or something, so in turn corrupts the quick book file?? once downloaded the QB file loses its meta-data in telling which version of QB it was made.</p>
<p>I tested zipping the file, uploading, downloading, unzipping, and it work just fine. so it cant be my upload script, its gotta be my download script, right?</p>
<p>maybe&#8230;. so i tested downloading the file straight from S3&#8217;s server. and it work just fine, so i concluded that it has to be the download script. but what part?</p>
<p>Could anyone enlighten me on whats wrong with my force download?</p>
<p>thanks for any help ahead of time!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arifcsecu</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-145775</link>
		<dc:creator>Arifcsecu</dc:creator>
		<pubDate>Mon, 14 Dec 2009 09:43:13 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-145775</guid>
		<description>Warning: S3::putBucket(freeworkouts.discountworkouts.com): [RequestTimeTooSkewed] The difference between the request time and the current time is too large. in C:\xampp\htdocs\sources\sources\S3.php on line 188

Warning: S3::putObject(): [RequestTimeTooSkewed] The difference between the request time and the current time is too large. in C:\xampp\htdocs\sources\sources\S3.php on line 312
Something went wrong while uploading your file... sorry.
Help ME:



Please select a file by clicking the &#039;Browse&#039; button and press &#039;Upload&#039; to start uploading your file.
All uploaded files

Warning: S3::getBucket(): [RequestTimeTooSkewed] The difference between the request time and the current time is too large. in C:\xampp\htdocs\sources\sources\S3.php on line 126

Warning: Invalid argument supplied for foreach() in C:\


where the problem is occured?</description>
		<content:encoded><![CDATA[<p>Warning: S3::putBucket(freeworkouts.discountworkouts.com): [RequestTimeTooSkewed] The difference between the request time and the current time is too large. in C:\xampp\htdocs\sources\sources\S3.php on line 188</p>
<p>Warning: S3::putObject(): [RequestTimeTooSkewed] The difference between the request time and the current time is too large. in C:\xampp\htdocs\sources\sources\S3.php on line 312<br />
Something went wrong while uploading your file&#8230; sorry.<br />
Help ME:</p>
<p>Please select a file by clicking the &#8216;Browse&#8217; button and press &#8216;Upload&#8217; to start uploading your file.<br />
All uploaded files</p>
<p>Warning: S3::getBucket(): [RequestTimeTooSkewed] The difference between the request time and the current time is too large. in C:\xampp\htdocs\sources\sources\S3.php on line 126</p>
<p>Warning: Invalid argument supplied for foreach() in C:\</p>
<p>where the problem is occured?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apoorva</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-132132</link>
		<dc:creator>apoorva</dc:creator>
		<pubDate>Mon, 16 Nov 2009 12:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-132132</guid>
		<description>m a late comer to AWS but thanks a lot for this super awesome tutorial..</description>
		<content:encoded><![CDATA[<p>m a late comer to AWS but thanks a lot for this super awesome tutorial..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A to Z of the World</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-127499</link>
		<dc:creator>A to Z of the World</dc:creator>
		<pubDate>Thu, 05 Nov 2009 11:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-127499</guid>
		<description>My bad...in the above post I said that this class doesn&#039;t support copy BUT IT DOES SUPPORT COPY.  It&#039;s just that this tutorial doesn&#039;t talk about it.</description>
		<content:encoded><![CDATA[<p>My bad&#8230;in the above post I said that this class doesn&#8217;t support copy BUT IT DOES SUPPORT COPY.  It&#8217;s just that this tutorial doesn&#8217;t talk about it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A to Z of the World</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-127497</link>
		<dc:creator>A to Z of the World</dc:creator>
		<pubDate>Thu, 05 Nov 2009 11:23:04 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-127497</guid>
		<description>Unfortunately no mention of Copy, which I&#039;m looking for and which can provide rename and move on S3.

Basically I&#039;m looking for a solution for file names more than 255 characters, which I can not create on my Linux servers.  So the solution I thought is to put/rename(copy to temp with another name-delete original-copy back to original)</description>
		<content:encoded><![CDATA[<p>Unfortunately no mention of Copy, which I&#8217;m looking for and which can provide rename and move on S3.</p>
<p>Basically I&#8217;m looking for a solution for file names more than 255 characters, which I can not create on my Linux servers.  So the solution I thought is to put/rename(copy to temp with another name-delete original-copy back to original)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ezuca</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-123060</link>
		<dc:creator>Ezuca</dc:creator>
		<pubDate>Sat, 24 Oct 2009 04:57:21 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-123060</guid>
		<description>This has been very helpful to me. Thanks a lot!</description>
		<content:encoded><![CDATA[<p>This has been very helpful to me. Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curiosidades sobre el desarrollo de brucut &#8212; Viciao2k3</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-122768</link>
		<dc:creator>Curiosidades sobre el desarrollo de brucut &#8212; Viciao2k3</dc:creator>
		<pubDate>Fri, 23 Oct 2009 16:50:22 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-122768</guid>
		<description>[...] Clase para gestionar ficheros en amazon s3 [...]</description>
		<content:encoded><![CDATA[<p>[...] Clase para gestionar ficheros en amazon s3 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dileep</title>
		<link>http://net.tutsplus.com/tutorials/php/how-to-use-amazon-s3-php-to-dynamically-store-and-manage-files-with-ease/comment-page-2/#comment-103062</link>
		<dc:creator>Dileep</dc:creator>
		<pubDate>Mon, 07 Sep 2009 05:12:52 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=31#comment-103062</guid>
		<description>Thanks yar .It helped me a lot

Regards
DileepKumar</description>
		<content:encoded><![CDATA[<p>Thanks yar .It helped me a lot</p>
<p>Regards<br />
DileepKumar</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.100 seconds -->
