Php generates an rss usage instance, and php generates an rss instance _ PHP Tutorial

Source: Internet
Author: User
Php generates an rss usage instance, and php generates an rss instance. Php generates an rss usage instance. php generates an rss instance. This article describes the usage of the php generated rss class and shares it with you for your reference. The details are as follows: phprequire (rssbuilder. class. php); he php generates an rss class usage instance; php generates an rss instance

The example in this article describes the usage of the rss generated by php and shares it with you for your reference. The details are as follows:

<? Phprequire ('rssbuilder. class. php'); header ('content-Type: application/xml; charset = UTF-8 '); header ('cache-Control: no-Cache, must-revalidate '); header ('expires: Fri, 14 Mar 1980 20:53:00 GMT'); header ('last-Modified :'. date ('r'); header ('pragma: no-cache'); $ rss = new RSSBuilder ('utf-8', 'http: // www.bkjia.com ', 'helping home', 'a powerful code sharing platform ', 'http: // www.bkjia.com/logo.png'); $ rss-> addDCdata ('', 'http: // www. bkj Ia.com ', date ('r'); $ data = array ('id' => 1, 'name' => 'php ', 'desc' => 'php sharing channel', 'start _ time' => '2017-11-17 '), array ('id' => 17, 'name' => 'jquery ', 'desc' => 'jquery sharing channel', 'start _ time' => '2017-11-17 ')); foreach ($ data as $ key => $ value) {$ rss-> addItem ('http: // www.bkjia.com/files/list_'.?value='id'}.'.html', $ value ['name'], 'http: // www.bkjia.com/files/list_'.?value='id'}.'.html '. 'From = rss ', $ value ['Desc'], $ value ['name'], $ value ['start _ time']);} $ rss-> outputRSS ($ ver);?>

In the code, click here to download the rssbuilder. class. php file.

I hope this article will help you with php programming.

Examples in this article describe the usage of rss generated by php and share it with you for your reference. Details: phprequire ('rssbuilder. class. php'); he...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.