<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated on Sat, 20 Mar 2010 21:27:05 -0500 -->
<rss version="2.0">
  <channel>    <title>Codeassembly - Generate xml sitemaps with php directly from the database of your site</title>
    <link>http://www.codeassembly.com/feed/comments/38</link>
    <description>CodeAssembly - Simplicity is prerequisite for reliability - Comments</description>
    <language>en-us</language>
    <managingEditor>contact@codeassembly.com</managingEditor>
    <webMaster>contact@codeassembly.com</webMaster>
    <generator>RSS Feed Generator</generator>
    <item>
      <title>Jeff</title>
      <description>After fixing the errors that m^e noted above I still couldn't get the script to work. ADODB is good but it appears there are errors still in the script.

Anyone else have luck?</description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#125</link>
      <pubDate>2008-05-29 11:43:35</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#125</guid>
    </item>
    <item>
      <title>miCRoSCoPiC^eaRthLinG</title>
      <description>Hey there... yep, I believe it's a ADODB bug. I traced the FetchRow() function to ADODB... but couldn't locate the cause. And yes, the query does return rows. My knowledge of MySQL statements fall in the "intermediate" region... so to avoid any problems while  using them through PHP, I always make sure the statement is wholly functional by testing them out first through phpMyAdmin and SQLYog. There's nothing wrong with the statement itself.. anyway, I'll try with the latest ADODB release and get back to you if it works out...

Thanks,
m^e</description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#86</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#86</guid>
    </item>
    <item>
      <title>CodeAssembly</title>
      <description>Does your query return any rows ? The FetchRow() function is within ADODB so it can be an ADODB bug, try updating ADODB.
Also try testing your query and see if it runs fine using phpmyadmin or another tool. </description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#83</link>
      <pubDate>2008-03-08 05:01:50</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#83</guid>
    </item>
    <item>
      <title>miCRoSCoPiC^eaRthLinG</title>
      <description>Got a question here for the author.

Scenario
---------
I'm using .htaccess to redirect all page requests to my script, which then parses the pretty URLs and loads the correct page. Now some of these pretty URLs are generated out of concatenating 2 different fields, i.e. a 6 digit ID and a content title. 

The statement goes like...
-----------------------------------
SELECT CONCAT( id, '-',  title_nicename ) AS content_title, list_date AS update_date FROM tbl_content, tbl_content_meta WHERE tbl_content.id = tbl_content_meta.id ORDER BY tbl_content.list_date DESC;
-----------------------------------

As you can see, the concatenated result is return as a pseudo field named content_title, which isn't physically present in any of the tables.

When I pass this statement to your sitemap class, I keep getting this error message:
-----------------------------------
Fatal error: Call to a member function FetchRow() on a non-object in E:\\xampp\\htdocs\\site\\core\\classes\\sitemap\\sitemap.php on line 185
-----------------------------------

In contrast, generating sitemap off hard-coded field names presents no problem at all. So the reason must be that the sitemap class is running into some difficulties reading the value out of this dynamically generated field.

Any ideas how to get this thing working?

Thanks,
m^e</description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#82</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#82</guid>
    </item>
    <item>
      <title>miCRoSCoPiC^eaRthLinG</title>
      <description>Forgot to thank the author :D Apart from those minor glitches this class works just fine. I got it integrated into my custom CMS in no time at all :)

Cheers,
m^e</description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#66</link>
      <pubDate>2008-01-10 05:21:21</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#66</guid>
    </item>
    <item>
      <title>miCRoSCoPiC^eaRthLinG</title>
      <description>I got the same error too.. i.e. "Parse error: parse error, unexpected T_RETURN, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in sitemap.inc on line 274".

If you look into the code, you'll find a misplaced "return" statement right before the closing brace '}' of the class. Commenting this out will make it work. Most likely the author didn't attach a tested copy of the class here.

After fixing the error above, I encountered a second one. The ping() function makes several calls to the file_get_contents() method, but on line 132, the same is written as contents() causing php to throw-up an error and halt. Changing that should help too.

Moreover, the URLs http://submissions.ask.com/ping and http://search.yahooapis.com/SiteExplorerService/V1/ping throw 403 Forbidden errors. Most likely the ping addresses have changed / and or require some sort of a login now. It'd be wise to enclose this section in a try-catch block so as to not break your code.

Cheers,
m^e</description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#65</link>
      <pubDate>2008-05-01 14:23:10</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#65</guid>
    </item>
    <item>
      <title>Agus Halim</title>
      <description>Agree with David, the code is too complex
i've got error message
Parse error: parse error, unexpected T_RETURN, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in sitemap.inc on line 274 and already chmod to 777 </description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#62</link>
      <pubDate>2008-03-21 14:02:43</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#62</guid>
    </item>
    <item>
      <title>David Bradley</title>
      <description>That looks far too difficult for my puny php brain. Much simpler (as I'm using Wordpress) is to use the sitemap plugin, which does it all with a couple of clicks.

db</description>
      <link>http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#34</link>
      <pubDate>2007-11-13 02:22:19</pubDate>
      <guid isPermaLink="true">http://codeassembly.com/Generate-xml-sitemaps-with-php-directly-from-the-database-of-your-site/#34</guid>
    </item>
  </channel></rss>