|  | Posted by MS on 02/15/06 21:17 
> > I'd like a way of reconnecting to a background script via a browser> > ... anyone?
 >
 > This is a complete guess, as ive done similar stuff, but not exactly as
 > below.
 > How about putting in something that checks for the presence of a
 > certain file. maybe /dir/stop.txt or anything.
 > And in the while loop, have this if() statement that checks for the
 > existence, and when you create this file, the background script finds
 > this file and then does a die() command, or even better, if you need to
 > make the script do more stuff, put the new php commands in this
 > stop.txt and use an inlude within the if() statement to carry them out.
 >
 > If you try this method, let me know if it works.
 > I have not yet put php scripts into background proccesses, so if you
 > know how to do this, let me know.
 >
 > Only done cron things upto now to run the script every so often, plus
 > running php script from command line and interacting with on the spot
 > user input, which is cool. Even got it interacting with mysql so i
 > could get info like i was using a normal program.
 >
 
 On the same idea,... I suppose you could create a page in you admin/CMS that
 allows you to update the database with a Stop_Background_scripts switch.
 
 then your background script reads the database Stop_Background_scripts and
 continues its process until the flag is set to false!!
 
 Alex
 ----------------------------------------------------------------------------
 http://www.myclubweb.co.uk - The Home of Club Websites
 ----------------------------------------------------------------------------
 [Back to original message] |