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

  • Home
  • SEARCH
  • 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 7922561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:00:08+00:00 2026-06-03T17:00:08+00:00

The php script parses xml file and print output on page inside div: <?php

  • 0

The php script parses xml file and print output on page inside div:

<?php
$playlistUrl = 'http://url/to/playlist.xml';
$xmldata = file_get_contents($playlistUrl);

$xml = new SimpleXMLElement($xmldata);

foreach( $xml->trackList->track as $track ) {
    echo $track->title .' - '. $track->annotation .'<br>';
}
?>

I want to update the output every 25sec without reloading the page, using some AJAX method. I find some code samples that set time interval:

// Poll the server each 60 seconds
window.setInterval(function() 
}, 60000);

also

setInterval(function(){
SomeAjaxFunction();
}, 1000);

How to implement this properly in my case?

  • 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-03T17:00:11+00:00Added an answer on June 3, 2026 at 5:00 pm

    check out my answer here.

    Refresh page element after specific time

    i have answered about how to reload the div after specific time, you can tweak it a bit to keep reloading after a time interval.

    the basics goes as follows.

    <div id="reload">
    //your PHP code and content are here.
    </div>
    

    and your jQuery code.

    <script>
    setInterval(function() {
        $('#reload').fadeOut("slow").load('reponse.php').fadeIn("slow");
    }, 10000);
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I used php script to parse remote xml file and print output on web
I have a php script that parses XML files and creates a large SQL
I have a PHP script that imports and parses XML files and saves the
I am currently reading an XML file from a PHP script (as below) which
I need to print the html transformed output of my php script in a
I'm writing a xml to text file script with PHP's xml parser. I delimit
Just say I have a file configuration.xml that a php script needs to parse
I'm using a PHP script with SimpleXML to parse an XML feed. I have
I am using a bespoke JQuery/PHP script which parses a Flickr feed using SimpliePie
I have a PHP script that executes a .bat file using system(cmd /c C:\dir\file.bat);

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.