I'm having one page output XML for other sites to parse. Unfortunately if I
give an RSS parser the site (the php file) it errors out. But if I put the
output in a XML file, and give that to the RSS parser everything works
perfectly. Does anyone know why it can't read it straight from the php file?
PHP Builder has it working, I have no idea why mine doesn't. Thanks


require "division/settings.inc";
require RootPath . "admin/Admin.php";  //these just define mysql logins and
echo "<" . "?xml version=\"1.0\"?" . ">\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"
echo "<rss version=\"0.91\">\n";
echo "<channel>\n";
  $query = mysql_query("Select * from " . PREFIX . "news order by Date Desc
Limit 40");
  while($results = mysql_fetch_array($query))
   echo "<item>\n";
   echo "<title>" . stripslashes($results["Subject"]) . "</title>\n";
   echo "<link>http://dod.stronger.org/</link>\n";
   echo "<author>$results[Name]</author>\n";
   echo "<description>" .
substr(htmlspecialchars(stripslashes($results["News"])),0,150) .
   echo "</item>\n";

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to