This article is a continuation of the previous article on using PHP to operate XML files. RSS is a form based on XML. Its specific specifications are as follows (we look at the format of the intercepted Sina RSS subscription channel):
Enter: http://rss.sina.com.cn/news/world/focus15.xml View the page source code to see the structure of RSS:
http://news.sina.com.cn/world
http://news.sina.com.cn/491/2008/0827/1.html
http://go.rss.sina.com.cn/redirect.php?url=http://news.sina.com.cn/w/2012-12-22/120825871683.shtml
While the vote is not legally binding, human rights activists say the biennial vote sends a strong signal to countries that still retain the death penalty in dwindling numbers... ]]>
What does the specific specification information mean? We can easily know according to the content of the tag. Next, we write an rss.php to read this xml and obtain the above article:
Run result: