This article mainly introduces the usage of rss generation in php. The example analyzes the skills for generating rss using rssbuilder. class. php files. If you need it, refer
This article mainly introduces the usage of rss generation in php. The example analyzes the skills for generating rss using rssbuilder. class. php files. If you need it, refer
The example in this article describes the usage of generating rss in 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.jb51.net ', 'feet home', 'powerful code sharing Platform', 'HTTP: // www.jb51.net/logo.png'); $ rss-> addDCdata ('', 'HTTP: // www. jb51. Net ', 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.jb51.net/files/list_'.{value}'id'}.'.html', $ value ['name'], 'HTTP: // www.jb51.net/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.