RSS (Really Simple Syndication) is XML, a data format that allows users to find web content without having to visit a Web site.
RSS provides a view of the Web data that is automatically transferred to the user by the new content.
The RSS view on a specific dataset is called an RSS feed (RSS feed) or a news Feed (newsfeed).
To view RSS feeds, you need an RSS feed reader, and most web browsers and email clients can order RSS feeds, and you just need to provide a feed URL for the news reader.
The RSS format is as follows:
<?xml version= "1.0" encoding= "Utf-8"? The >//xml directive indicates that the document contains XML code <RSS version= "2.0" ><channel><title >jack ' s page-newsfeed</title>// link for the entire channel channel<link>http://xxx.com/</link> //Channel , usually the associated web site <description>all orders from the description of the Jack's page</description>//channel <language>en-us</ Language> //Do not explain <item> //Description A news <title>xxxxxx</title> //News title <link>http:// Www.xxx.com/index.php?id2</link> //The actual link to the news <pubdate>tue, 6 Jan 00:00:00</pubdate>// Press Release date <description>xxxxxx</description> //News description </item>......//other Item</channel></rss >
To see an RSS format for the actual PHP, the above format should be able to read the description:
<?php header (' Content-type:text/xml ');? ><?php Echo ' <?xml version= ' 1.0 ' encoding= ' utf-8 '?> ';?> <rss version= "2.0" > <channel> <title>jack ' s page-newsfeed</title> <link>http://loca lhost:8086</link> <description>all orders from Jack ' s page</description> <language>en-us< /language><?php $dbc = mysqli_connect (' 127.0.0.1 ', ' root ', ' welcome01! ', ' booksorderdb ') or Die (' Error connectin G to MySQL server. '); $query = "SELECT * from Books_order"; $data = Mysqli_query ($DBC, $query) or Die (' Error querying database. '); Formatting it as RSS while ($row = Mysqli_fetch_array ($data)) {//Display each row as a RSS item echo ' <it Em> '; Echo ' <title> '. $row [' name ']. ' ('. $row [' Male ']. ' </title> '; Echo ' <link>http://localhost:8086/php/showAllOrder.php</link> '; Echo ' <pubDate> '. $row [' Date ']. ' ' . Date (' T '). ' </pubDate> '; EcHo ' <description> '. $row [' Books ']. ' </description> '; Echo ' </item> '; }?> </channel></rss>
This allows you to subscribe to the PHP news in your browser or Outlook, and each time the database has a value update, the terminal that subscribes to the news will automatically receive a notification.
It looks a bit like email, the difference is that email is a two-way conversation, you can respond to an email message, and then get back the response. While RSS is one-way communication, from a website to an individual, but individuals cannot respond to news
Introduction to RSS Technical Specifications