Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Thanked 0 Times in 0 Posts

    Help Me Fix My RSS Feed

    I built it with PHP, but the problem seems to be XML related. That's why I'm posting it here. This is my first attempt at an RSS feed, so go easy on me. I was able to bookmark the feed in Firefox, but when you go to the bookmark, it says "Live bookmark feed failed to load."

    PHP Code:

    /** Coded by: Jeffrey (Joseph Witchard)
         ** Created on: 06/13/09
         ** Last modified: 06/13/09
         ** Purpose: To syndicate Rebirth news
         **          via RSS. */
         // configure to XML
    header("Content-Type: application/xml; charset=utf-8");
    // include the connection setting
    // set up the connection
    $conn access_function();
    // set up the query
    $query "SELECT post_id, author_name, DATE_FORMAT(date_posted, '%W, %M %d, %Y %l:%i %p') AS formatted_date, author_email, description, a.category_id, c.category_name, title FROM posts a INNER JOIN categories c ON a.category_id = c.category_id ORDER BY post_id LIMIT 10";
    // start pulling out the data
    if ($stmt $conn->prepare($query))
    '<?xml version="1.0"?>';
    '<rss version="2.0">';
            while (
    ** I got it working. Aside from all of the syntax errors, I didn't realize that XML tags were messing it up; I assumed they would be required. Now I need to know how to add a title to it, because when I bookmark the feed now, the default title is http://www.uhrebirth.com/rss.php (the URL to the feed).
    Last edited by Joseph Witchard; 06-13-2009 at 09:18 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts