<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[DeltaScripts — New RSS genereating script]]></title>
		<link>http://www.deltascripts.com/board/viewtopic.php?id=6914</link>
		<atom:link href="http://www.deltascripts.com/board/extern.php?action=feed&amp;tid=6914&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in New RSS genereating script.]]></description>
		<lastBuildDate>Fri, 28 Sep 2007 14:29:22 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=38723#p38723</link>
			<description><![CDATA[<p>Nice code !!! I search to insert jpeg photo for all ads in xml code. Anyone have do this ? thanks.</p>]]></description>
			<author><![CDATA[null@example.com (Beber)]]></author>
			<pubDate>Fri, 28 Sep 2007 14:29:22 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=38723#p38723</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=26166#p26166</link>
			<description><![CDATA[<p>Ah, interesting, it&#039;s the &#039;&amp;&#039; mentioned above, simple* change of&nbsp; &#039;&amp;&#039; to &#039;and&#039; sorted things. </p><p>*However, the code uses $catname for both the naming of the output file and for the naming of the title so be sure to either hack it to keep the output file the same or change just the title section, or, bear in mind you output files will change to have the word &#039;and&#039; instead of &#039;&amp;&#039;...</p><p>Graeme.</p>]]></description>
			<author><![CDATA[null@example.com (gee_fin)]]></author>
			<pubDate>Tue, 28 Mar 2006 09:37:04 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=26166#p26166</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=26163#p26163</link>
			<description><![CDATA[<p>Hmm, I think I&#039;ve just hit a similar problem. Some of my RSS category feeds are working perfectly and some are chucking out with the error &quot;Whitespace is not allowed at this location. Error processing resource.&quot; (<a href="http://www.racedandrallied.com">http://www.racedandrallied.com</a>).</p><p>Strange as pretty much all categories fire out similar info and previous whitespaces haven&#039;t been an issue (%20), got some digging to do to find the guilty chars...</p><p>Graeme.</p>]]></description>
			<author><![CDATA[null@example.com (gee_fin)]]></author>
			<pubDate>Tue, 28 Mar 2006 08:30:25 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=26163#p26163</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=26079#p26079</link>
			<description><![CDATA[<p>atheas i&#039;m using version 6.20 but i&#039;m getting a weird problem</p><p>Your script doesn&#039;t work properly, rss.php has to be on script root with CHMOD of 777 and test folder also has to be with CHMOD of 777 <img src="http://www.deltascripts.com/board/img/smilies/neutral.png" width="15" height="15" alt="neutral" /></p><p>I get an error on line 19 of rss.php even with CHMOD of 777 in both.<br /></p><div class="codebox"><pre><code>$fp = fopen($file ,&quot;w&quot;);</code></pre></div><p>Even tough it creates 92 xml files they don&#039;t work as a feed, just a simple page (opera doesn&#039;t identify them as feeds)<br />Btw, how you can insert the feeds on the layout so that the user can add that category as a feed and not all ? Insert manualy a link in each category to the xml?</p>]]></description>
			<author><![CDATA[null@example.com (lc)]]></author>
			<pubDate>Thu, 23 Mar 2006 16:30:10 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=26079#p26079</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25950#p25950</link>
			<description><![CDATA[<p>Atheas, at the moment, my solution is a crude one - I have Validate Ads switched on and will review ads via the Edit links before they go out publicly. Trouble is, as the website becomes more successful and the number of ads requiring review rises, this will prove to not be a solution at all <img src="http://www.deltascripts.com/board/img/smilies/sad.png" width="15" height="15" alt="sad" /></p><p>ambglb, thanks for the suggestion. My classifieds is based in Taiwan (Big5 encoding). Fortunately, most of the ads will be written in English, but special characters (like that bullet point) could still sneak in. I am adding instructions in my Add Ad pages advising sellers to stick to the standard alphanumeric character set. But for those who cut--n-paste their ads, they may ignore it.</p><p>At this early stage, it shouldn&#039;t be a problem to edit errant ads since traffic is low. However, looking ahead, this could turn out to be a real pain in the neck</p>]]></description>
			<author><![CDATA[null@example.com (gussie)]]></author>
			<pubDate>Sun, 19 Mar 2006 08:22:30 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25950#p25950</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25787#p25787</link>
			<description><![CDATA[<p>you could try using str_replace<br /></p><div class="codebox"><pre><code>$sitetitle_rss=$sitetitle;
$sitetitle_rss = str_replace(&#039;illegal character&#039;, &#039;new character&#039;, $sitetitle_rss);</code></pre></div><p>or<br /></p><div class="codebox"><pre><code>$sitetitle_rss=$sitetitle;
$sitetitle_rss = str_replace(&#039;&amp;&#039;, &#039;_&#039;, $sitetitle_rss);
$sitetitle_rss = str_replace(&#039;&amp;&#039;, &#039;&#039;, $sitetitle_rss);</code></pre></div><p>the first one changes all occurnces of &amp; in the site title to _<br />the second on deletes all the &amp;<br />just keep adding lines for each character you want to change, you could also add full words like</p><div class="codebox"><pre><code>$sitetitle_rss=$sitetitle;
$sitetitle_rss = str_replace(&#039;swear word&#039;, &#039;&#039;, $sitetitle_rss);
$sitetitle_rss = str_replace(&#039;cursing&#039;, &#039;c**sing&#039;, $sitetitle_rss);</code></pre></div><p>you could also create an array of all the illegal characters you want to change and use that in the first varible</p>]]></description>
			<author><![CDATA[null@example.com (ambglb)]]></author>
			<pubDate>Sun, 12 Mar 2006 07:21:07 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25787#p25787</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25739#p25739</link>
			<description><![CDATA[<p>Hi gussie,</p><p>I have the same problem with the illegal characters and I&#039;m looking for a solution to eliminate them but I didn&#039;t find any so far. Keep me posted if you find one.</p><p>Regards,<br />Atheas</p>]]></description>
			<author><![CDATA[null@example.com (atheas)]]></author>
			<pubDate>Fri, 10 Mar 2006 06:20:02 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25739#p25739</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25738#p25738</link>
			<description><![CDATA[<div class="quotebox"><cite>gussie wrote:</cite><blockquote><p>Something which may be an issue is the feed generating scripts&#039;s use of the category name. Some of my category names have spaces - like &quot;Men seeking Men&quot;. I can change this to &quot;m4m&quot;, but what about my &quot;Language Exchange&quot; category? I am afraid I&#039;ll be making too many sacrifices. I&#039;ll look into changing the choice of feed name from the Category&#039;s name to the Category&#039;s ID number.</p></blockquote></div><p>This doesn&#039;t seem to be a problem after all - since the browser simply renders spaces as &quot;%20&quot; <img src="http://www.deltascripts.com/board/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>But another illegal character issue that I have encountered using the original RSS Feed generating script is when someone uses a special character in their classified ad - it could crash the xml. What happened once was someone used a bullet list in their ad description. The bullet character they used was part of the extended character set. The RSS generating script processed as usual, but the illegal bullet passed through. When I tried to pull the feed, it stopped at the illegal bullet</p><p>My classified website will allow input in Big5 Chinese characters, so I am worried that there may be an illegal character used in some Chinese characters.</p><p>My question is, how I can I limit the input on my classifieds so that only XML-friendly characters will be used?</p>]]></description>
			<author><![CDATA[null@example.com (gussie)]]></author>
			<pubDate>Fri, 10 Mar 2006 01:32:11 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25738#p25738</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25737#p25737</link>
			<description><![CDATA[<p>atheas, many thanks</p><p>I had to tweak it a bit, bit it seems to work <img src="http://www.deltascripts.com/board/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Here&#039;s what I needed to do:</p><p>1. for some reason, my server has trouble with the &quot;?&quot; character - after I run the feed generating script, the resulting xml pages have an error with it. I get around the problem by substituting the ? in the XML tags of your script with a variable.</p><div class="quotebox"><blockquote><p>$sql_cat = &quot;select $cat_tbl.catname from $cat_tbl order by catid&quot;;<br />$sql_getcat = mysql_query ($sql_cat);<br />$num_cat = mysql_num_rows($sql_getcat);</p><p><span style="color: #FF0000">$questionmark = &quot;?&quot;;</span></p><p>for ($i=0; $i&lt;$num_cat; $i++)<br />{<br />&nbsp; &nbsp; &nbsp; $row = mysql_fetch_array($sql_getcat);<br />$catname = $row[&quot;catname&quot;];</p><p>$x = &quot;feeds/&quot; . $catname;<br />$file = $x . &quot;.xml&quot;;</p><p>$fp = fopen($file ,&quot;w&quot;);<br /><span style="color: #FF0000">fwrite($fp, &quot;&lt;&quot;.$questionmark.&quot;xml version=\&quot;1.0\&quot; &quot;.$questionmark.&quot;&gt;\n&quot;);</span></p></blockquote></div><p>2. I also have problems with the double line break in the first xml tags - so you might have noticed above in the second line that I highlighted in red that I removed the &quot;\n&quot; at the beginning of the line</p><p>Except for these 2 adjustments, the feeds generation worked fine</p><p>Something which may be an issue is the feed generating scripts&#039;s use of the category name. Some of my category names have spaces - like &quot;Men seeking Men&quot;. I can change this to &quot;m4m&quot;, but what about my &quot;Language Exchange&quot; category? I am afraid I&#039;ll be making too many sacrifices. I&#039;ll look into changing the choice of feed name from the Category&#039;s name to the Category&#039;s ID number.</p>]]></description>
			<author><![CDATA[null@example.com (gussie)]]></author>
			<pubDate>Fri, 10 Mar 2006 01:12:29 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25737#p25737</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25689#p25689</link>
			<description><![CDATA[<p>Hi,<br />I modified the script so that it generates a feed for every category.<br />Here is what you should do:<br />Create a folder named test (if you name it different don&#039;t forget to modify the script); CHMOD this folder to 755.<br />Create a file rss.php (you can name it different if you like) in the same folder that you created the &quot;test&quot; folder. Insert in this file this code:</p><p>&lt;?<br />session_start(); <br />include_once(&quot;admin/inc.php&quot;);<br />if ($validation == 1) { $val_string = &quot; AND valid = 1&quot;; } else { $val_string = &quot;&quot;; } <br />if ($validation == 1) { $val_string2 = &quot; where valid = 1&quot;; } else { $val_string2 = &quot;&quot;; }</p><p>$sql_cat = &quot;select $cat_tbl.catname from $cat_tbl order by catid&quot;;<br />$sql_getcat = mysql_query ($sql_cat);<br />$num_cat = mysql_num_rows($sql_getcat);</p><p>for ($i=0; $i&lt;$num_cat; $i++) <br />{ <br />&nbsp; &nbsp; &nbsp; $row = mysql_fetch_array($sql_getcat); <br /> $catname = $row[&quot;catname&quot;]; </p><p>$x = &quot;test/&quot; . $catname;<br />$file = $x . &quot;.xml&quot;;</p><p>$fp = fopen($file ,&quot;w&quot;);<br />fwrite($fp, &quot;\n&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&quot;);<br />fwrite($fp, &quot;\n&lt;rss version=\&quot;2.0\&quot;&gt;\n&quot;); <br />fwrite($fp, &quot;&lt;channel&gt;\n&quot;);<br />fwrite($fp, &quot;&lt;title&gt;TITLE&lt;/title&gt;\n&quot;);<br />fwrite($fp, &quot;&lt;link&gt;http://&quot;.$url.&quot;/&lt;/link&gt;\n&quot;);<br />fwrite($fp, &quot;&lt;description&gt;DESCRIPTION&lt;/description&gt;\n&quot;);<br />fwrite($fp, &quot;&lt;language&gt;en&lt;/language&gt;\n&quot;);<br />fwrite($fp, &quot;&lt;lastBuildDate&gt;&quot;.strftime(&quot;%a, %d %b %Y %T %Z&quot;,time()).&quot;&lt;/lastBuildDate&gt;\n&quot;);<br />fclose($fp);<br />}</p><p>$sql_links = &quot;select $ads_tbl.siteid,$ads_tbl.sitetitle,$ads_tbl.sitedescription,$ads_tbl.datestamp, $cat_tbl.catname from </p><p>$ads_tbl inner join $cat_tbl on $ads_tbl.sitecatid = $cat_tbl.catid $val_string2 order by datestamp desc, siteid desc&quot;; <br />$sql_result = mysql_query ($sql_links); <br />$num_links = mysql_num_rows($sql_result);</p><p>for ($i=0; $i&lt;$num_links; $i++) <br />{ <br />&nbsp; &nbsp;$sitetitle = &quot;&quot;; <br />&nbsp; &nbsp; &nbsp; $row = mysql_fetch_array($sql_result); <br />&nbsp; &nbsp; &nbsp; $siteid = $row[&quot;siteid&quot;]; <br />&nbsp; &nbsp; &nbsp; $sitetitle = strip_tags($row[&quot;sitetitle&quot;]);<br />$sitetitle = strtolower($sitetitle);<br />$sitetitle = ucfirst($sitetitle);<br />&nbsp; &nbsp; &nbsp; // only displaying first 150 characters of the ad text <br />&nbsp; &nbsp; &nbsp; $sitedescription = substr($row[&quot;sitedescription&quot;],0,1000);<br />$sitedescription = strtolower($sitedescription);<br />$sitedescription = ucfirst($sitedescription);<br />&nbsp; &nbsp; &nbsp; $catname = $row[&quot;catname&quot;]; <br />&nbsp; &nbsp; &nbsp; //$datestamp = strftime(&quot;%a, %d %b %Y %T %Z&quot;,$row[&quot;datestamp&quot;]); <br />&nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; $datestamp = strftime(&quot;%a, %d %b %Y %T %Z&quot;,strtotime($row[&quot;datestamp&quot;]));</p><p>$x = &quot;test/&quot; . $catname;<br />$file = $x . &quot;.xml&quot;;</p><p>$fp = fopen($file ,&quot;a&quot;); <br />fwrite($fp, &quot;&lt;item&gt;&quot;); <br />fwrite($fp, &quot;&lt;title&gt;&quot;.$catname.&quot; : &quot;.$sitetitle.&quot;&lt;/title&gt;\n&quot;); <br />fwrite($fp, &quot;&lt;link&gt;http://&quot;.$url.&quot;/detail.php?siteid=&quot;.$siteid.&quot;&lt;/link&gt;\n&quot;); <br />fwrite($fp, &quot;&lt;description&gt;&quot;.$sitedescription.&quot;&lt;/description&gt;\n&quot;); <br />fwrite($fp, &quot;&lt;pubDate&gt;&quot;.$datestamp.&quot;&lt;/pubDate&gt;\n&quot;);<br />fwrite($fp, &quot;&lt;/item&gt;&quot;); <br />fclose($fp);<br />}</p><p>$sql_cat = &quot;select $cat_tbl.catname from $cat_tbl order by catid&quot;;<br />$sql_getcat = mysql_query ($sql_cat);<br />$num_cat = mysql_num_rows($sql_getcat);</p><p>for ($i=0; $i&lt;$num_cat; $i++) <br />{ <br />&nbsp; &nbsp; &nbsp; $row = mysql_fetch_array($sql_getcat); <br /> $catname = $row[&quot;catname&quot;]; </p><p>$x = &quot;test/&quot; . $catname;<br />$file = $x . &quot;.xml&quot;;</p><p>$fp = fopen($file ,&quot;a&quot;); <br />fwrite($fp, &quot;\n&lt;/channel&gt;\n&quot;);<br />fwrite($fp, &quot;\n&lt;/rss&gt;\n&quot;);<br />fclose($fp);<br />}<br />?&gt;</p><p>Run this file from your IE window; it should create in the test folder xml files for every categories.</p><p>This script is in &quot;beta&quot; version if I may say so; I just created it and I didn&#039;t had time to tweak it&nbsp; so please post here every error you get or improvment you make.</p>]]></description>
			<author><![CDATA[null@example.com (atheas)]]></author>
			<pubDate>Wed, 08 Mar 2006 10:30:35 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25689#p25689</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25673#p25673</link>
			<description><![CDATA[<p>Hello,</p><p>Setting up the cronjob results in the following error in CronJob log:</p><p>/public_html/rss.php: line 1: ?: No such file or directory<br />/public_html/rss.php: line 2: syntax error near unexpected token `;&#039;<br />/public_html/rss.php: line 2: `session_start(); &#039;</p><p>Any suggestions?</p>]]></description>
			<author><![CDATA[null@example.com (Plebs)]]></author>
			<pubDate>Tue, 07 Mar 2006 22:30:21 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25673#p25673</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25308#p25308</link>
			<description><![CDATA[<p>Also, can I control the number of entries in a feed? What is the maximum in this script? I&#039;m hoping I can raise this so there are many in the feed. Is this how to look at it?</p>]]></description>
			<author><![CDATA[null@example.com (gussie)]]></author>
			<pubDate>Sun, 12 Feb 2006 07:02:56 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25308#p25308</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25307#p25307</link>
			<description><![CDATA[<p>How can I set or change this script so that only specific categories or sub-categories are streamed? For example, say I have 3 categories: Jobs, Personals and Merchandise, and I want to have separate feeds for each. I suppose I could have 3 separate feed generating scripts - how do I specify whic category to choose from?</p>]]></description>
			<author><![CDATA[null@example.com (gussie)]]></author>
			<pubDate>Sun, 12 Feb 2006 07:01:01 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25307#p25307</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25219#p25219</link>
			<description><![CDATA[<p>Hi, Iam getting and Invalid page when reading the rss.xml in my browser: </p><p>&quot;The XML page cannot be displayed <br />Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.&quot; </p><br /><p>I think because i use non english caracters, is there a way for the script work with non engish caracters and acents like</p>]]></description>
			<author><![CDATA[null@example.com (polo)]]></author>
			<pubDate>Mon, 06 Feb 2006 18:14:08 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25219#p25219</guid>
		</item>
		<item>
			<title><![CDATA[Re: New RSS genereating script]]></title>
			<link>http://www.deltascripts.com/board/viewtopic.php?pid=25215#p25215</link>
			<description><![CDATA[<div class="quotebox"><cite>killedar wrote:</cite><blockquote><p>You can create a cron job to periodically run the script to generate rss.xml. Then this is no different than you index.html file accessed by two people simultaneously (which happens all the time)</p></blockquote></div><p>I&#039;m new to rss, but the script seems to work for me <img src="http://www.deltascripts.com/board/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>I&#039;m wondering if it&#039;s possible to get the script&nbsp; to run at the same time as update.php is run? I&#039;m limited in the number of cron jobs I can set up on my server.</p><p>AndyC</p>]]></description>
			<author><![CDATA[null@example.com (AndyC)]]></author>
			<pubDate>Mon, 06 Feb 2006 12:26:33 +0000</pubDate>
			<guid>http://www.deltascripts.com/board/viewtopic.php?pid=25215#p25215</guid>
		</item>
	</channel>
</rss>
