<?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: Building a Datafeed Site &#8211; Step 2</title>
	<atom:link href="http://www.ericnagel.com/2010/03/building-a-datafeed-site-step-2.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html</link>
	<description>Affiliate Marketer - I make money, by making other companies money.</description>
	<lastBuildDate>Mon, 30 Jan 2012 16:44:20 +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: Jon</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53907</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Wed, 21 Dec 2011 17:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53907</guid>
		<description>Hi Eric, I finally get it to &quot;work&quot;, We know the file got moved to the &quot;temp&quot; folder but we got errors: this is one of them.
Warning: fopen(26485.txt) [function.fopen]: failed to open stream: No such file or directory in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 29
$fp = fopen($cTxtFile, “r”);   ( I just replaced this with
$fp = fopen(&quot;/home/johnny01/public_html/mysite/temp/26485.txt&quot;, &quot;r&quot;);  and got echo :  The products have been updated. Now I can see the table &#039;products&#039;  populated,Next,I am going to start step 3. thanks for all your help! :P</description>
		<content:encoded><![CDATA[<p>Hi Eric, I finally get it to &#8220;work&#8221;, We know the file got moved to the &#8220;temp&#8221; folder but we got errors: this is one of them.<br />
Warning: fopen(26485.txt) [function.fopen]: failed to open stream: No such file or directory in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 29<br />
$fp = fopen($cTxtFile, “r”);   ( I just replaced this with<br />
$fp = fopen(&#8220;/home/johnny01/public_html/mysite/temp/26485.txt&#8221;, &#8220;r&#8221;);  and got echo :  The products have been updated. Now I can see the table &#8216;products&#8217;  populated,Next,I am going to start step 3. thanks for all your help! <img src='http://www.ericnagel.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Nagel</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53780</link>
		<dc:creator>Eric Nagel</dc:creator>
		<pubDate>Tue, 20 Dec 2011 19:42:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53780</guid>
		<description>Sorry it&#039;s not working for you. I can only debug so much without having access. Either &lt;a href=&quot;http://www.ericnagel.com/wp-content/uploads/2010/03/simple1.zip&quot; rel=&quot;nofollow&quot;&gt;try downloading the final solution&lt;/a&gt;, or &lt;a href=&quot;http://www.ericnagel.com/php-programmer&quot; rel=&quot;nofollow&quot;&gt;contact me about doing the job for you&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Sorry it&#8217;s not working for you. I can only debug so much without having access. Either <a href="http://www.ericnagel.com/wp-content/uploads/2010/03/simple1.zip" rel="nofollow">try downloading the final solution</a>, or <a href="http://www.ericnagel.com/php-programmer" rel="nofollow">contact me about doing the job for you</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53778</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 20 Dec 2011 19:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53778</guid>
		<description>Eric,this is the transcript report from hostgator.com.

Hello Johnny, 

Thank you for contacting support! We are happy to help! There is an error_log file in the temp directory, I would appear that it is expecting a resource and you supplied a boolean variable and that the execution time waiting for this was exceeded. 

[root@gator1214 /home/johnny01/public_html/mysite/temp]# tail -f error_log 
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78
[20-Dec-2011 10:48:53] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 93 

I hope you can interpret this error_logs better than I do. thanks.</description>
		<content:encoded><![CDATA[<p>Eric,this is the transcript report from hostgator.com.</p>
<p>Hello Johnny, </p>
<p>Thank you for contacting support! We are happy to help! There is an error_log file in the temp directory, I would appear that it is expecting a resource and you supplied a boolean variable and that the execution time waiting for this was exceeded. </p>
<p>[root@gator1214 /home/johnny01/public_html/mysite/temp]# tail -f error_log<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Warning:  fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 78<br />
[20-Dec-2011 10:48:53] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 93 </p>
<p>I hope you can interpret this error_logs better than I do. thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53751</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 20 Dec 2011 16:56:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53751</guid>
		<description>Hi Eric, I made the changes but did not work( I forgot to mention, I am not using Wordpress) I noticed something on the table products I have ;field #1 ProductID and the last one is field #42 bActiveproduct. 
on your script:
$rsMap[&#039;ProductID&#039;] = 0;  
$rsMap[&#039;Option5&#039;] = 40;
thanks for your help.</description>
		<content:encoded><![CDATA[<p>Hi Eric, I made the changes but did not work( I forgot to mention, I am not using WordPress) I noticed something on the table products I have ;field #1 ProductID and the last one is field #42 bActiveproduct.<br />
on your script:<br />
$rsMap['ProductID'] = 0;<br />
$rsMap['Option5'] = 40;<br />
thanks for your help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Nagel</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53746</link>
		<dc:creator>Eric Nagel</dc:creator>
		<pubDate>Tue, 20 Dec 2011 15:54:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53746</guid>
		<description>Remove the . before ./home

chdir(&#039;/home/johnny01/public_html/mysite/temp/&#039;);

(Wordpress will probably make those &quot;smart&quot; quotes, so make sure you use a regular, single-quote</description>
		<content:encoded><![CDATA[<p>Remove the . before ./home</p>
<p>chdir(&#8216;/home/johnny01/public_html/mysite/temp/&#8217;);</p>
<p>(WordPress will probably make those &#8220;smart&#8221; quotes, so make sure you use a regular, single-quote</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53743</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 20 Dec 2011 15:16:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53743</guid>
		<description>Hi Eric,I have contacted my hosting provider and they advised me to change 
chdir(&#039;./temp/&#039;); 
with 
chdir(&#039;./home/johnny01/public_html/mysite/temp/&#039;); 
this time the .txt (274Kb) file got put to the new &quot;temp&quot; file location
These are the new errors:

Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 16
chdir(&#039;./home/johnny01/public_html/mysite/temp/&#039;); 

Warning: unlink(26485.txt) [function.unlink]: No such file or directory in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 23
unlink($_FILES[&#039;sas&#039;][&#039;name&#039;]); 

Warning: fopen(26485.txt) [function.fopen]: failed to open stream: No such file or directory in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 29
$fp = fopen($cTxtFile, &quot;r&quot;);

Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 74
    while (($rsItem = fgetcsv($fp, 100000, &quot;&#124;&quot;)) !== FALSE) {



I am doing this step by step ,my id is set in vars.php, datafeed size is only 274kb . thank you again. Jon</description>
		<content:encoded><![CDATA[<p>Hi Eric,I have contacted my hosting provider and they advised me to change<br />
chdir(&#8216;./temp/&#8217;);<br />
with<br />
chdir(&#8216;./home/johnny01/public_html/mysite/temp/&#8217;);<br />
this time the .txt (274Kb) file got put to the new &#8220;temp&#8221; file location<br />
These are the new errors:</p>
<p>Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 16<br />
chdir(&#8216;./home/johnny01/public_html/mysite/temp/&#8217;); </p>
<p>Warning: unlink(26485.txt) [function.unlink]: No such file or directory in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 23<br />
unlink($_FILES['sas']['name']); </p>
<p>Warning: fopen(26485.txt) [function.fopen]: failed to open stream: No such file or directory in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 29<br />
$fp = fopen($cTxtFile, &#8220;r&#8221;);</p>
<p>Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite/admin-sas-datafeed.php on line 74<br />
    while (($rsItem = fgetcsv($fp, 100000, &#8220;|&#8221;)) !== FALSE) {</p>
<p>I am doing this step by step ,my id is set in vars.php, datafeed size is only 274kb . thank you again. Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Nagel</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53725</link>
		<dc:creator>Eric Nagel</dc:creator>
		<pubDate>Tue, 20 Dec 2011 12:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53725</guid>
		<description>Hi Jon,

Line 75 handles that replacement for you, so leave it as-is. You set your ID in vars.php, which you get in &lt;a href=&quot;http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-%E2%80%93-step-1b.html&quot; rel=&quot;nofollow&quot;&gt;Step 1b&lt;/a&gt;

Are you trying a very, very large datafeed?

Are you putting this all together step-by-step, or are you using the &lt;a href=&quot;http://www.ericnagel.com/wp-content/uploads/2010/03/simple1.zip&quot; rel=&quot;nofollow&quot;&gt;final zip of all of the files&lt;/a&gt;?</description>
		<content:encoded><![CDATA[<p>Hi Jon,</p>
<p>Line 75 handles that replacement for you, so leave it as-is. You set your ID in vars.php, which you get in <a href="http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-%E2%80%93-step-1b.html" rel="nofollow">Step 1b</a></p>
<p>Are you trying a very, very large datafeed?</p>
<p>Are you putting this all together step-by-step, or are you using the <a href="http://www.ericnagel.com/wp-content/uploads/2010/03/simple1.zip" rel="nofollow">final zip of all of the files</a>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53599</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Mon, 19 Dec 2011 21:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53599</guid>
		<description>wow thanks for the fast feedback.
Eric, I noticed the temp file I created with 777 permissions has 4 files out of these files 3 start with the prefix core.(follow by a number) eg. core.13652 and so on their sizes ares 8.03MB each. the other file is an error_log (256MB) also this particular merchant has its datafeed as text file. one more thing in your code line 75     $rsItem[$rsMap[&#039;Link&#039;]] = str_replace(&#039;YOURUSERID&#039;, $nSASID, $rsItem[$rsMap[&#039;Link&#039;]]); I have replace &#039;YOURUSERID&#039; with my ShareASale user ID number.. as suggested by my merchant instructions: You will need to replace every occurrence of YOURUSERID in this file, with your actual ShareASale userID number, which is 111111. Your browser will probably ask you if you want to Open the file, or Save. Choose &quot;Save&quot;, and save the file to your computer...from there you can open it in any program you wish. 

Fields are seperated by the &quot;&#124;&quot; &quot;Pipe&quot; symbol, not by the comma. this may be a silly question but  in your code str_replace(&#039;YOURUSERID&#039;, $nSASID, are not the same ? store in vars.php, maybe I am missing something simple here, hope you can help me to understand and then figure it out. thanks again.</description>
		<content:encoded><![CDATA[<p>wow thanks for the fast feedback.<br />
Eric, I noticed the temp file I created with 777 permissions has 4 files out of these files 3 start with the prefix core.(follow by a number) eg. core.13652 and so on their sizes ares 8.03MB each. the other file is an error_log (256MB) also this particular merchant has its datafeed as text file. one more thing in your code line 75     $rsItem[$rsMap['Link']] = str_replace(&#8216;YOURUSERID&#8217;, $nSASID, $rsItem[$rsMap['Link']]); I have replace &#8216;YOURUSERID&#8217; with my ShareASale user ID number.. as suggested by my merchant instructions: You will need to replace every occurrence of YOURUSERID in this file, with your actual ShareASale userID number, which is 111111. Your browser will probably ask you if you want to Open the file, or Save. Choose &#8220;Save&#8221;, and save the file to your computer&#8230;from there you can open it in any program you wish. </p>
<p>Fields are seperated by the &#8220;|&#8221; &#8220;Pipe&#8221; symbol, not by the comma. this may be a silly question but  in your code str_replace(&#8216;YOURUSERID&#8217;, $nSASID, are not the same ? store in vars.php, maybe I am missing something simple here, hope you can help me to understand and then figure it out. thanks again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Nagel</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53582</link>
		<dc:creator>Eric Nagel</dc:creator>
		<pubDate>Mon, 19 Dec 2011 20:05:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53582</guid>
		<description>Just guessing, but the script may not have permission to write the file after unzipping.</description>
		<content:encoded><![CDATA[<p>Just guessing, but the script may not have permission to write the file after unzipping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.ericnagel.com/how-to-tips/building-a-datafeed-site-step-2.html/comment-page-1#comment-53581</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Mon, 19 Dec 2011 19:58:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.ericnagel.com/?p=1217#comment-53581</guid>
		<description>Hi, first of all, thanks for sharing your code. Unfortunately I was not able to make it work.I am getting the following error.
Warning: fopen(26485.txt) [function.fopen]: failed to open stream: No such file or directory in /home/johnny01/public_html/mysite.com/admin-sas-datafeed.php on line 29 ($fp = fopen($cTxtFile, &quot;r&quot;);  )

Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite.com/admin-sas-datafeed.php on line 74  (while (($rsItem = fgetcsv($fp, 100000, &quot;&#124;&quot;)) !== FALSE) {   )     please advice.thanks.</description>
		<content:encoded><![CDATA[<p>Hi, first of all, thanks for sharing your code. Unfortunately I was not able to make it work.I am getting the following error.<br />
Warning: fopen(26485.txt) [function.fopen]: failed to open stream: No such file or directory in /home/johnny01/public_html/mysite.com/admin-sas-datafeed.php on line 29 ($fp = fopen($cTxtFile, &#8220;r&#8221;);  )</p>
<p>Warning: fgetcsv() expects parameter 1 to be resource, boolean given in /home/johnny01/public_html/mysite.com/admin-sas-datafeed.php on line 74  (while (($rsItem = fgetcsv($fp, 100000, &#8220;|&#8221;)) !== FALSE) {   )     please advice.thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

