Reputation: 633
1) I want to make a live score mobile app in which the updates for the app is retrieved from my website....which is stored in the form of text file 2) On the server I want to write a scripting file which will do the work of retrieving the live score from some RSS feed & convert it into the text file format I need for the app
Now the Q is I want to make this scripting file to be invoked after every 1 minute to update the live score....either server should invoke this file or is there any mechanism in which the file will invoke itself
Thanks
Upvotes: 0
Views: 522
Reputation: 3604
expanding a wee bit on Hacknightly's answer:
..with a bit more clarity for general consumption:
<head>
<meta http-equiv="refresh" content="30">
</head>
Upvotes: 0
Reputation: 5164
You could use this lovely little HTML snippet if you just want the page to refresh every x amount of seconds
<META HTTP-EQUIV=Refresh CONTENT='60; URL=index.php' />
Upvotes: 2
Reputation: 5209
Serve the scores up in JSON format and simply use jQuery.getJSON to grab the data in the client.
http://api.jquery.com/jQuery.getJSON/
See these answers for examples:
Reload AJAX data every X minutes/seconds, jQuery
Ajax success, how to refresh response every minute
Upvotes: 0
Reputation: 22168
Have a look at the javascript setInterval method. It allows you to invoke a javascript method on a timed interval. You could use that javascript method + ajax to call back to the server. Without knowing your back end technology, one can't get into specifics about what to do on the server, however.
Upvotes: 2