| 1:15 am on Jan 14, 2010 (gmt 0)|
I'm not sure, but one thought I'm having is to look at pre-compiling your script and see if that makes it possible for you... One of the problems with constant running is browsers and servers timing out the script execution. (If you're on your own box you have more flexibility here, but otherwise you probably won't be able to have the script run constantly, unless maybe you can somehow do it by pre-compiling.) There's one I run that takes literally a couple of days and I have to set a meta refresh on it for every 40 seconds (using firefox) and then when I hit the max redirects I have to manually reload the page and start it over.
Not sure on other options, maybe someone else has some better ones...
| 1:28 am on Jan 14, 2010 (gmt 0)|
Yeah, I was thinking AJAX myself. I know a PHP script can be opened and left running, but it seems to me it'd be a lot easier to just use a backend AJAX app on my client and couple that with whomever else is accessing the script... so if the power goes out or something the script will still be running. Maybe.
| 1:39 am on Jan 14, 2010 (gmt 0)|
|I know a PHP script can be opened and left running |
Until you hit the max execution time of the box your script is hosted on. I've run into it a couple times on one box anyway...
| 1:56 am on Jan 14, 2010 (gmt 0)|
Have you considered languages other than PHP for this task? PHP doesn't seem particularly well-suited for this sort of thing.
| 6:10 am on Jan 14, 2010 (gmt 0)|
I have, and I've also considered how stubborn I am. I know PHP/MySQL and DHTML... and every time I attempt to do something with C++ or similar languages I hit a brick wall of libraries and a lack of documentation.
| 8:30 pm on Jan 15, 2010 (gmt 0)|
Some time ago, I read something about PHP daemons, which can run in the server background and can be a solution for your game...
You can read more about daemon on:
What kind of information do you want to run automatically?