I am looking to create a PHP script that checks a websites RSS feed for changes based on a specific term then emailing me a notification if it does.
I know how to setup the email system and setup a cron job but I dont know how to get PHP to search for a term on an RSS feed 🙁
Example:
I have the script set to BBC News (http://feeds.bbci.co.uk/news/rss.xml) to check to see if the term “David Cameron” appears in the title or main text of any of the top 3 feeds and if so email me a notification if it does.
I’m not asking anyone to write me a script but if anyone knows of any tutorials to setup an RSS search it would be greatful, also it doesnt need to be all singing script, its just for me
RSS is just ordinary XML which can be easily parsed with
DOM.And then parse it with
xPathOnce you have item nodes you can get titles really easily by using
GetElementesByTagName():Or if you can count on valid rss always containing
<title>: