PHP syntax

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
Just in case - global variables are not persistent across script executions, they are simply available to any method/class in that particular running instance of the script.
If you want to have something which remembers values across instances, you will need to look into some form of caching. You can try APC (a quick search of Google gives https://www.if-not-true-then-false.com/2012/php-apc-configuration-and-usage-tips-and-tricks/ ) which allows you to do what your after ( I think ). There are other caching methods - memcache, redis etc. and all have their own features and benefits/problems.
 
Depends on the type of call and the need to get through to the person, but trying to automate something like this is more a problem of how the call is handled and not the technical problems. The main thing with any type of solution would be the fact that you seem to give a call pause_seconds and then assume the call is finished. This may be the case, but what about the outcome of the call?
Technically - you could probably do with setting these files in a specific directory, so that they don't pollute the scripts.
If you use multiple scripts to do this work, it is possible that more than one script will try and call the person, but this will in itself fail - but be prepared that the creation of the file may throw a warning. This is the same for any type of race condition, just make sure your prepared for things to fail and manage them.
 
Back
Top