<?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: Howto: Create and Stream a CSV with PHP</title>
	<atom:link href="http://bluedogwebservices.com/howto-create-stream-csv-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://bluedogwebservices.com/howto-create-stream-csv-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=howto-create-stream-csv-php</link>
	<description>BlueDog Web Services</description>
	<lastBuildDate>Thu, 26 Jan 2012 21:06:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Manish</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-483</link>
		<dc:creator>Manish</dc:creator>
		<pubDate>Fri, 15 Oct 2010 12:25:31 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-483</guid>
		<description>Hello there,

The white space is causing this kind of problem. Try to print this array on the browser, you&#039;ll see some extra space. This is the culprit. 

This extra space is coming from any of your include file. When you start writing the code, do not leave any space on top of the code.

I was having the same problem &amp; got this fixed by just removing extra space from one of my included file.

Manish</description>
		<content:encoded><![CDATA[<p>Hello there,</p>
<p>The white space is causing this kind of problem. Try to print this array on the browser, you&#8217;ll see some extra space. This is the culprit. </p>
<p>This extra space is coming from any of your include file. When you start writing the code, do not leave any space on top of the code.</p>
<p>I was having the same problem &amp; got this fixed by just removing extra space from one of my included file.</p>
<p>Manish</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sangeeth</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-482</link>
		<dc:creator>Sangeeth</dc:creator>
		<pubDate>Sat, 04 Sep 2010 06:33:38 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-482</guid>
		<description>Thanks for the quick response, Aaron!

Here&#039;s my code below.

header(&quot;Cache-Control: must-revalidate, post-check=0, pre-check=0&quot;);
header(&#039;Content-Description: File Transfer&#039;);
header(&quot;Content-type: text/csv&quot;);
$fileName = &#039;somefile.csv&#039;;
header(&quot;Content-Disposition: attachment; filename={$fileName}&quot;);
header(&quot;Expires: 0&quot;);
header(&quot;Content-Transfer-Encoding: binary&quot;); 
header(&quot;Pragma: public&quot;);

$dataString = &quot;Start of the stringrnrn&quot;;
$dataString .= &quot;Concatenate rest of the string&quot;;

$fh = @fopen( &#039;php://output&#039;, &#039;w&#039; );
fwrite($fh, $dataString);

fclose($fh);

exit;</description>
		<content:encoded><![CDATA[<p>Thanks for the quick response, Aaron!</p>
<p>Here&#8217;s my code below.</p>
<p>header(&#8220;Cache-Control: must-revalidate, post-check=0, pre-check=0&#8243;);<br />
header(&#8216;Content-Description: File Transfer&#8217;);<br />
header(&#8220;Content-type: text/csv&#8221;);<br />
$fileName = &#8216;somefile.csv&#8217;;<br />
header(&#8220;Content-Disposition: attachment; filename={$fileName}&#8221;);<br />
header(&#8220;Expires: 0&#8243;);<br />
header(&#8220;Content-Transfer-Encoding: binary&#8221;);<br />
header(&#8220;Pragma: public&#8221;);</p>
<p>$dataString = &#8220;Start of the stringrnrn&#8221;;<br />
$dataString .= &#8220;Concatenate rest of the string&#8221;;</p>
<p>$fh = @fopen( &#8216;php://output&#8217;, &#8216;w&#8217; );<br />
fwrite($fh, $dataString);</p>
<p>fclose($fh);</p>
<p>exit;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron D. Campbell</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-481</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Sat, 04 Sep 2010 06:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-481</guid>
		<description>Without seeing your files, I really couldn&#039;t say.</description>
		<content:encoded><![CDATA[<p>Without seeing your files, I really couldn&#8217;t say.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sangeeth</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-480</link>
		<dc:creator>Sangeeth</dc:creator>
		<pubDate>Sat, 04 Sep 2010 05:55:16 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-480</guid>
		<description>Just to clarify the extra blank line/character is coming in the beginning of the file.</description>
		<content:encoded><![CDATA[<p>Just to clarify the extra blank line/character is coming in the beginning of the file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sangeeth</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-479</link>
		<dc:creator>Sangeeth</dc:creator>
		<pubDate>Sat, 04 Sep 2010 05:53:37 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-479</guid>
		<description>Thanks for this article!  It was very useful.

However I&#039;m facing a small issue.  I&#039;m getting an extra blank line when I open the .csv file in excel.  Any idea what this could be and how to remove it?

I also modified the script to create a .txt file.  But here too an extra character is coming.</description>
		<content:encoded><![CDATA[<p>Thanks for this article!  It was very useful.</p>
<p>However I&#8217;m facing a small issue.  I&#8217;m getting an extra blank line when I open the .csv file in excel.  Any idea what this could be and how to remove it?</p>
<p>I also modified the script to create a .txt file.  But here too an extra character is coming.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron D. Campbell</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-478</link>
		<dc:creator>Aaron D. Campbell</dc:creator>
		<pubDate>Thu, 15 Jul 2010 17:57:36 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-478</guid>
		<description>I don&#039;t think you understand what&#039;s happening then.  The filename (somefile.csv) is only being sent in the header so that it is offered as the suggested name for the user who&#039;s downloading it to save it as.  The whole point of this streaming is that it&#039;s not actually writing this data anywhere on the server.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think you understand what&#8217;s happening then.  The filename (somefile.csv) is only being sent in the header so that it is offered as the suggested name for the user who&#8217;s downloading it to save it as.  The whole point of this streaming is that it&#8217;s not actually writing this data anywhere on the server.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: spe</title>
		<link>http://bluedogwebservices.com/howto-create-stream-csv-php/#comment-477</link>
		<dc:creator>spe</dc:creator>
		<pubDate>Thu, 15 Jul 2010 10:39:56 +0000</pubDate>
		<guid isPermaLink="false">http://bluedogwebservices.com/?p=500#comment-477</guid>
		<description>the problem is that if two process , try to write to the same file that&#039;s (somefile.csv) at the same time will not be so good huh? there should be a possibility to stream arrays to a csv structure just for downloading other wise you just got &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</description>
		<content:encoded><![CDATA[<p>the problem is that if two process , try to write to the same file that&#8217;s (somefile.csv) at the same time will not be so good huh? there should be a possibility to stream arrays to a csv structure just for downloading other wise you just got &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

