Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3792888
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:41:30+00:00 2026-05-19T12:41:30+00:00

I want to use php to create RSS from mysql. I can see the

  • 0

I want to use php to create RSS from mysql. I can see the content in the page source code. But I can not see the item part in Web Browser(IE, Firefox or Opera). the Web Browser just show

`Your RSS Feed Name or Website Name

A description of your feed or site.`

<?PHP
require_once ('mysql_connect.php'); 
    //SET XML HEADER
    header('Content-type: text/xml');

    //CONSTRUCT RSS FEED HEADERS
    $output = '<rss version="2.0">';
    $output .= '<channel>';
    $output .= '<title>Your RSS Feed Name or Website Name</title>';
    $output .= '<description>A description of your feed or site.</description>';
    $output .= '<link>http://www.yoursite.com/</link>';
    $output .= '<copyright>Your copyright details</copyright>';

    //BODY OF RSS FEED
    mysql_select_db("rss", $db);
    $result = mysql_query("SELECT * FROM rss limit 15",$db);
        while ($row = mysql_fetch_array($result)) {
            $output .= '<item>';
                $output .= '<title>'. $row['title'] .'</title>';
                $output .= '<description>'. $row['content'] .'</description>';
                $output .= '<link>'. $row['link'] .'</link>';
                $output .= '<pubDate></pubDate>';
            $output .= '</item> ';
        }
    mysql_close($db); 
    //CLOSE RSS FEED
    $output .= '</channel>';
    $output .= '</rss>';

    //SEND COMPLETE RSS FEED TO BROWSER
    echo($output);

?>

the xml source looks like:

<rss version="2.0">
<channel>
<title>Your RSS Feed Name or Website Name</title>
<description>A description of your feed or site.</description>
<link>http://www.yoursite.com/</link>
<copyright>Your copyright details</copyright>
  <item>
    <title>MILAN, ITALY - SEPTEMBER 26: Models walk the runway at Emi&hellip</title>       
    <description>Date: Sep 26, 2009 7:45 PMNumber of Comments on Photo:0View Photo&hellip;</description>
    <link>http://picasaweb.google.com/roxyluvtony/KendraSpears#5551895410815389042</link>
    <pubDate></pubDate>
  </item>
  ...
</channel>
</rss>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:41:31+00:00Added an answer on May 19, 2026 at 12:41 pm

    Moving my comment to an Answer…

    it’s not valid XML because of the &hellip; entity in your <title> and <description> nodes.

    Wrap those strings with a <![CDATA[tag]]> and try again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use php in console mode and create an environment to test
I'd love to use PHP variables in my CSS files but I don't want
I want to execute a php-script from php that will use different constants and
im using php to create a sorta rss aggregator that stores data from multiple
I want to create feeds, so first, should I use rss 1, 2 or
I want to create a PHP app that can send text messages ; There
I have a working PHP server. Now I want to use databases (MySQL or
I want to create some YAML key with value - the code in php.
I want to use php to create a snapshot of all the files in
Why would I want to use PHP's filter library? Why wouldn't I? It seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.