PHP database simulation

Posted by Emdiesse on Stack Overflow See other posts from Stack Overflow or by Emdiesse
Published on 2010-06-02T15:50:24Z Indexed on 2010/06/02 15:54 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

I have a PHP script that works by calling items from a database based upon the time they were placed in there and it deletes them if they are older than 5 minutes. Basically, I want to now simulate what would happen if this database was being updated regularly.

So I was considering sticking in some code that loads an XML file then goes through and parses that into the database based upon the time data located within a node of the xml data... but the problem there is I want it to continually loop through an enter this data so it'll never actually run the other processes

So I was thinking of having another PHP script do that that could do this independantly of the php script that is going to display this data...

In theory:

I am looking to have a button that I can press and it will then run some php code to load up an XML file from a directory on my web server and then iterate though the data sending the data, to a database, based upon the time within a node in the PHP script and when the script was first called

So back to my page that displayed the data... if I continually hit refresh it will contain different results each time because data is being added by the other process and this php script removes the older data when it is refreshed

Any information on this?

Is there a way I can silently, and safely, run a php script without it being loaded into a browser... like a thread!?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql