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 3424792
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:31:01+00:00 2026-05-18T06:31:01+00:00

I have a script that sends out a push notification to users based on

  • 0

I have a script that sends out a push notification to users based on whats in a PHP file.
This is that file …the parts that matter …

   $doc = new DOMDocument();
  $doc->load('RandomXML Url location here ');
  $arrFeeds = array();
  foreach ($doc->getElementsByTagName('item') as $node) {
    $itemRSS = array ( 
      'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
      'desc' => $node->getElementsByTagName('description')->item(0)->nodeValue,
      'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
      'date' => $node->getElementsByTagName('pubDate')->item(0)->nodeValue
      );
    array_push($arrFeeds, $itemRSS);
  }
// APPLE APNS EXAMPLE 1
$apns->newMessage(2);
$apns->addMessageAlert($itemRSS['title']);
// $apns->addMessageCustom('acme2', array('bang', 'whiz'));
$apns->queueMessage();
// SEND ALL MESSAGES NOW
$apns->processQueue();

So thats the PHP that sends out the notification. It sends out the notification when this PHP script is loaded.

It loads the first post from the feed and sends it out. I want to send a notification out every time the RSS feed is updated with a new post. If it is updated with a new feed, then I want to run the above code.

So how can I do that and make sure it is run frequently?

I would really like to see what code I need to check if its updated? I don’t know how to check for updates though and thats probably the most important part of the script.

  • 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-05-18T06:31:02+00:00Added an answer on May 18, 2026 at 6:31 am

    Configure Cron to run your script every e.g. 1 hour and in script add code to check is RSS modified.

    EDIT:
    1. You can configure Cron to run your script every e.g. 1 hour.
    2. To the script, add the code to test whether the RSS has been modified.
    3. To check whether the feed was changed use the tag. You can save the tag content to txt and compare it.
    4. To write tag content you can use SimpleXML and fwrite.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a php script that sends out emails with attachments once people have
I have a PHP script that sends critical e-mails. I know how to check
I have a script that sends out emails every minute. When it starts its
I know this sounds very dumb, but we have a client that sends out
I have a script that takes a table name and generates a control file
I am going to create a script that sends out an email. I am
I have a php script that does some processing (creates remittance advice PDFs, self-billing
I have written a Perl script that sends data to clients. It works some
I have a simple script that will send out a bunch of emails but
I have a PHP script that loads XML content dynamically: require_once 'directory/directory/'; $nice= '1149632';

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.