开发者

get a list of all the xml pages on a website

开发者 https://www.devze.com 2022-12-17 00:21 出处:网络
using php how do开发者_StackOverflow I go to a website and receive a list of all the xml files on a site. (It would also be nice to get the last date changed also)

using php how do开发者_StackOverflow I go to a website and receive a list of all the xml files on a site. (It would also be nice to get the last date changed also)

There is a html files linking to html pages with a xml counterpart, does that help?


You might want to use SimpleXML or file_get_contents function depending on your requirements.


Depends on what you mean by "list of all xml files". There's no way to find unlinked files without a brute force search (which is impossible in practice at this scale). If you only care about linked files, you'll either have to crawl manually and match links in the content of the pages, or do a Google search with site:example and inurl:.xml then parse the results.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号