<?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: Save ByteArray to file with PHP</title>
	<atom:link href="http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/</link>
	<description>Actionscript3, Flash, Scala, Java, C#, C++, Algorithms &#38; Imageprocessing</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:26:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Eduardo</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-288460</link>
		<dc:creator>Eduardo</dc:creator>
		<pubDate>Sun, 05 Feb 2012 21:26:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-288460</guid>
		<description>Thanks a lot man, every other $·%· site was publishing a lot of long crap. Your example is short but to the point. Worked on the first try THANKS!</description>
		<content:encoded><![CDATA[<p>Thanks a lot man, every other $·%· site was publishing a lot of long crap. Your example is short but to the point. Worked on the first try THANKS!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andras Csizmadia</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-282030</link>
		<dc:creator>Andras Csizmadia</dc:creator>
		<pubDate>Mon, 19 Dec 2011 11:08:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-282030</guid>
		<description>Sorry, this post was intented to sent here:)
http://marstonstudio.com/2007/10/19/how-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps/
Just you were on the credit list.
I had a long weekend..

A.</description>
		<content:encoded><![CDATA[<p>Sorry, this post was intented to sent here:)<br />
<a href="http://marstonstudio.com/2007/10/19/how-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps/" rel="nofollow">http://marstonstudio.com/2007/10/19/how-to-take-a-snapshot-of-a-flash-movie-and-automatically-upload-the-jpg-to-a-server-in-three-easy-steps/</a><br />
Just you were on the credit list.<br />
I had a long weekend..</p>
<p>A.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andras Csizmadia</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-282028</link>
		<dc:creator>Andras Csizmadia</dc:creator>
		<pubDate>Mon, 19 Dec 2011 10:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-282028</guid>
		<description>Hello,

I had problem with your script and php mod security:

ModSecurity: Multipart parsing error: Multipart: Invalid Content-Disposition header (-12): form-data; name=&quot;image_file&quot;;
filename=&quot;screenshot.jpg&quot;screenshot.jpg&quot;

The problem is with the filename duplication: screenshot.jpg&quot;screenshot.jpg

Solution:
bytes = &#039;Content-Disposition: form-data; name=&quot;&#039;+uploadDataFieldName+&#039;&quot;; filename=&quot;&#039; + fileName + &#039;&#039;; // removed quote from and of line between &#039;&#039;
And I had to comment out this line:
//postData.writeUTFBytes(fileName);

Is it a proper solution? What you think?

Best,
Andrew</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I had problem with your script and php mod security:</p>
<p>ModSecurity: Multipart parsing error: Multipart: Invalid Content-Disposition header (-12): form-data; name=&#8221;image_file&#8221;;<br />
filename=&#8221;screenshot.jpg&#8221;screenshot.jpg&#8221;</p>
<p>The problem is with the filename duplication: screenshot.jpg&#8221;screenshot.jpg</p>
<p>Solution:<br />
bytes = &#8216;Content-Disposition: form-data; name=&#8221;&#8216;+uploadDataFieldName+&#8217;&#8221;; filename=&#8221;&#8216; + fileName + &#8221;; // removed quote from and of line between &#8221;<br />
And I had to comment out this line:<br />
//postData.writeUTFBytes(fileName);</p>
<p>Is it a proper solution? What you think?</p>
<p>Best,<br />
Andrew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sathyan</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-281099</link>
		<dc:creator>Sathyan</dc:creator>
		<pubDate>Wed, 14 Dec 2011 18:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-281099</guid>
		<description>Can any one tell me the location of the saved file file.txt in the website or localhost after using the php code

$fp = fopen( ‘file.txt’, ‘wb’ );
fwrite( $fp, $GLOBALS[ &#039;HTTP_RAW_POST_DATA&#039; ] );
fclose( $fp );

Thanks in Advance</description>
		<content:encoded><![CDATA[<p>Can any one tell me the location of the saved file file.txt in the website or localhost after using the php code</p>
<p>$fp = fopen( ‘file.txt’, ‘wb’ );<br />
fwrite( $fp, $GLOBALS[ 'HTTP_RAW_POST_DATA' ] );<br />
fclose( $fp );</p>
<p>Thanks in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GJ</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-258225</link>
		<dc:creator>GJ</dc:creator>
		<pubDate>Fri, 22 Jul 2011 23:54:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-258225</guid>
		<description>I have been able to save a file named file.txt to my server. It has a bunch of grabley characters in it and is 74K. What do I do with this to see it as an uploaded image? This is all new and exciting. So close but yet far.

Thanks!</description>
		<content:encoded><![CDATA[<p>I have been able to save a file named file.txt to my server. It has a bunch of grabley characters in it and is 74K. What do I do with this to see it as an uploaded image? This is all new and exciting. So close but yet far.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jipe</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-238318</link>
		<dc:creator>Jipe</dc:creator>
		<pubDate>Thu, 07 Apr 2011 17:36:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-238318</guid>
		<description>If it&#039;s creating empty files, check folder permissions. After two hours of searching, tried to give the folder chmod777 and it works!! Thanks!</description>
		<content:encoded><![CDATA[<p>If it&#8217;s creating empty files, check folder permissions. After two hours of searching, tried to give the folder chmod777 and it works!! Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua Crigger</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-232896</link>
		<dc:creator>Joshua Crigger</dc:creator>
		<pubDate>Thu, 10 Mar 2011 17:55:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-232896</guid>
		<description>Once again thank you soo much! This code has rocked. I finally finished my project and if it was not for you code I would have been stuck for another week +. 

You can check out what I created with it at the following link. http://www.runlikeananimal.com/postcard.html

The way I used the code was to save the bytearray as a .jpg file onto our server so that users can either directly download the postcard they made, email it, or even post it to a social network. 

http://www.joshuacrigger.com/</description>
		<content:encoded><![CDATA[<p>Once again thank you soo much! This code has rocked. I finally finished my project and if it was not for you code I would have been stuck for another week +. </p>
<p>You can check out what I created with it at the following link. <a href="http://www.runlikeananimal.com/postcard.html" rel="nofollow">http://www.runlikeananimal.com/postcard.html</a></p>
<p>The way I used the code was to save the bytearray as a .jpg file onto our server so that users can either directly download the postcard they made, email it, or even post it to a social network. </p>
<p><a href="http://www.joshuacrigger.com/" rel="nofollow">http://www.joshuacrigger.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tom</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-229677</link>
		<dc:creator>tom</dc:creator>
		<pubDate>Thu, 24 Feb 2011 13:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-229677</guid>
		<description>hey thanks for that snippet!
is it possible to send the ByteArray directly as an image email attachment? 
any ideas on that?</description>
		<content:encoded><![CDATA[<p>hey thanks for that snippet!<br />
is it possible to send the ByteArray directly as an image email attachment?<br />
any ideas on that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Elliott</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-210659</link>
		<dc:creator>Tom Elliott</dc:creator>
		<pubDate>Mon, 29 Nov 2010 14:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-210659</guid>
		<description>Works a treat, thanks.</description>
		<content:encoded><![CDATA[<p>Works a treat, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: url send</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-210658</link>
		<dc:creator>url send</dc:creator>
		<pubDate>Mon, 29 Nov 2010 14:29:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-210658</guid>
		<description>Perfect, thanks a lot - just what I was looking for!</description>
		<content:encoded><![CDATA[<p>Perfect, thanks a lot &#8211; just what I was looking for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aldo Marsilio</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-207084</link>
		<dc:creator>Aldo Marsilio</dc:creator>
		<pubDate>Mon, 01 Nov 2010 10:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-207084</guid>
		<description>Absolutely awesome job.
Is there a way to have a progress bar indicator while we send the bytearray to PHP? I would like to give to the users an indication on about how long they have to wait in order to have that snapshot saved onto the server.</description>
		<content:encoded><![CDATA[<p>Absolutely awesome job.<br />
Is there a way to have a progress bar indicator while we send the bytearray to PHP? I would like to give to the users an indication on about how long they have to wait in order to have that snapshot saved onto the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francesco</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-199265</link>
		<dc:creator>Francesco</dc:creator>
		<pubDate>Mon, 30 Aug 2010 20:15:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-199265</guid>
		<description>Greate example!
Grazie ;)</description>
		<content:encoded><![CDATA[<p>Greate example!<br />
Grazie ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogerio Penchel</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-198911</link>
		<dc:creator>Rogerio Penchel</dc:creator>
		<pubDate>Wed, 25 Aug 2010 03:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-198911</guid>
		<description>Thanks a lot. I lost hours because I was not setting
request.contentType = ‘application/octet-stream’;</description>
		<content:encoded><![CDATA[<p>Thanks a lot. I lost hours because I was not setting<br />
request.contentType = ‘application/octet-stream’;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nik</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-195364</link>
		<dc:creator>Nik</dc:creator>
		<pubDate>Wed, 07 Jul 2010 13:41:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-195364</guid>
		<description>Great snippet thanks!
I&#039;m looking for a way to pass the file name of the newly created image back to Flash so I can write the url to a database.

I&#039;ve been trying to get the value from contentLoaderInfo but I don&#039;t think that property is available...</description>
		<content:encoded><![CDATA[<p>Great snippet thanks!<br />
I&#8217;m looking for a way to pass the file name of the newly created image back to Flash so I can write the url to a database.</p>
<p>I&#8217;ve been trying to get the value from contentLoaderInfo but I don&#8217;t think that property is available&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kannan</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-192980</link>
		<dc:creator>Kannan</dc:creator>
		<pubDate>Fri, 28 May 2010 00:47:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-192980</guid>
		<description>Why its creating 0 byte file?</description>
		<content:encoded><![CDATA[<p>Why its creating 0 byte file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Piet</title>
		<link>http://blog.joa-ebert.com/2006/05/01/save-bytearray-to-file-with-php/comment-page-1/#comment-191834</link>
		<dc:creator>Piet</dc:creator>
		<pubDate>Wed, 12 May 2010 15:39:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.je2050.de/?p=69#comment-191834</guid>
		<description>I&#039;ve a question about the security of this method.

There is no security, right?

Everybody can send a request to the requestUrl and insert chars in the file specified or am I wrong?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve a question about the security of this method.</p>
<p>There is no security, right?</p>
<p>Everybody can send a request to the requestUrl and insert chars in the file specified or am I wrong?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

