bandit8 wrote:Hi,
Does anyone know how to, using PHP or other, to automatically write files from a mySQL database on a server to a local machine?
Basically the reason I need it, is that the database will be continually getting new data from various users, and I want the information to be copied to a local file on my own computer every 15 minutes or so (just continually rewriting the file on my local machine, with the newest data). This way, if there is a server error, or internet connectivity issues, I will still always be able to access the latest data by opening the file on my local machine.
Any thoughts? If clarification is needed, just let me know.
Thanks!
b.
Some thoughts, but it's not easy for casual users, and may cause me some grief for suggesting it.
If you schedule a local machine driver using a compiler driven language like C,C#, VB etc. , you could then control a server side PHP script to respond with some HTTP or XML.
It's also possible that you might be able to use (with reservations) the Yahoo Widget package with their version of Javascript on the client side, or perhaps a script like VBscript.
On the server side, you would need to write a PHP driver that when invoked at client request, would access the database, and formulate a client reply.
The client invocation can be scheduled at defined intervals from the OS, or the compiler executable itself (sleep) when it requests the HTTP or XML response.
On awake, the client can request, and update local files from the HTTP or XML response.