Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
368 views
in Technique[技术] by (71.8m points)

php - How To Discover RSS Feeds for a given URL

I get a URL from a user. I need to know:
a) is the URL a valid RSS feed?
b) if not is there a valid feed associated with that URL

using PHP/Javascript or something similar

(Ex. http://techcrunch.com fails a), but b) would return their RSS feed)

Edit: See my answer below

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Found something that I wanted:

Google's AJAX Feed API has a load feed and lookup feed function (Docs here).

a) Load feed provides the feed (and feed status) in JSON

b) Lookup feed provides the RSS feed for a given URL

Theres also a find feed function that searches for RSS feeds based on a keyword.

Planning to use this with JQuery's $.getJSON


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...