Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8856461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:21:43+00:00 2026-06-14T14:21:43+00:00

I am looking to create a PHP script that checks a websites RSS feed

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:21:44+00:00Added an answer on June 14, 2026 at 2:21 pm

    RSS is just ordinary XML which can be easily parsed with DOM.

    $doc = new DOMDocument();
    $doc->load('http://feeds.bbci.co.uk/news/rss.xml');
    

    And then parse it with xPath

    $xpath = new DOMXPath($doc);
    foreach( $xpath->query( '//item') as $node){
        // $node is DOMElement
    }
    

    Once you have item nodes you can get titles really easily by using GetElementesByTagName():

    $titleNodes = $node->GetElementsByTagName('title');
    if( $titleNodes->length < 1){
       // Error
    }
    $title = $titleNodes->item(0)->nodeValue;
    

    Or if you can count on valid rss always containing <title>:

    $title = $node->GetElementsByTagName('title')->item(0)->nodeValue;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking to create a simple php script that based on the URI,
I'm looking to create a web based application in PHP that receives LDAP requests
I'm looking to create a PHP script that will echo the unique ID of
I am looking to create a php script that detects twitter style hashtags from
I'm looking to create a PHP script where, a user will provide a link
I'm looking to create a PHP function that can trim each line in a
I am looking for free/opensource php form email script/class. The main requirement is that
Possible Duplicate: How I can create installer for website. PHP mysql I'm looking to
I looking to create a custom calender with Zend Framework, I am hoping that
Im looking to create a control that would look like comic baloon. In WPF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.