Considering that the two machine’s time settings are not synced, is it still possible to run a PHP script (for example) in each of them and they will still generate the same random code when run every x hours?
For example:
If I run the script in server A on 1PM it will return “random182”.
If I run the script in server B on 1PM it will return “random182”.
If I run the script in server A on 2PM it will return “random747”.
If I run the script in server B on 2PM it will return “random747”.
If it’s possible, how and what sort of functions should I be looking at?
The machines need a common initialisation vector (IV) for their pseudo-random sequence.
Classically this is system time (if security is unimportant). So: