begna112
begna112

Reputation: 399

storing MySQL results in XML files and auto refreshing

I have a MySQL database that is being updated pretty regularly. I have found out how to to use PHP to put output the database in XML format but i dont think it is really what I want.

I want to end up with an XML file hosted online that refreshes itself every 5 minutes or so with the contents of the MySQL database (could possibly be a very large database).

I know that I could simply use MySQL and export it as XML but that would require me sitting there and doing that over and over again.

does anyone know of a good way of going about this?

Upvotes: 0

Views: 341

Answers (2)

Jose Vega
Jose Vega

Reputation: 10258

If you have access to the server you can create a schedule operation that runs every 5 minutes. With a linux server you would use cron.

#MIN HOUR DAYOFMONTH MONTH DAYOFWEEK COMMAND
*/5    *       *       *      *      /home/adam/script.php

The script.php file will create the xml file and store where ever you like.

Upvotes: 2

numone
numone

Reputation: 774

Use javascript that makes a call to the server every 5 minutes. Either use AJAX if you are more familiar with it or just have it reload the page if you are less familiar with it.

Upvotes: 0

Related Questions