the problem is that i need to do this from 2 different servers. a script on server A will set the array and then i need to read it in another script on server B. Basically i wish to have one server do all the processing and setting of variables (caching)and then have other servers just read/access those variables and display differently. My issue is that i cant communicate data from server to another.
set arrays into cache files
get file contents based on file creation time
if i do #1 in server A and #2 in server B then i cant get the file creation time in server B and thus need to do #2 in server A also. But then how do i get the variables back to B?
below is what I have and works fine when working in one server. BUT how do i pass the $results_ to a different server??
if ( file_exists($file) && time() < filemtime($file) + $interval ) {
$results = unserialize(file_get_contents($file));
} else {
...processing
$results = array('aa','ss','ddd');
$fp = fopen($file, 'w+') or die("Could not open $file.");
fwrite($fp, serialize($results_));
fclose($fp);
}