hi everyone,
I have a script that includes a page from another server and Im having problems passing the value back to the original page.
any ideas?
this is my first code which first checks the version of a local file and then includes the server checking page.
<?php
$update_server = "http://www.sourceserver.com";
// Lets pick our filename
$filename = 'ws_gigs.php';
// Lets check the version of the local copy first
if (file_exists($filename)) {
echo "<br>$filename current version: " . date ("Y-m-d H:i:s", filemtime($filename));
$current_version = date ("YmdHis", filemtime($filename));
}
// Lets include the filename information and get the source server version
$file_path = "$update_server/check_updates.php?filename=$filename";
include($file_path);
echo "<br><br>";
// Lets check the difference in the version
if($current_version > $latest_source){
echo "You have an early current version, please update.";
}else{
echo "You have the current version";
}
echo "<br><br>";
// Display the results clearly
echo "Current Version: $current_version<br>";
echo "Latest Version: $latest_source<br>";
?>
then the server page looks like this:
<?php
$update_filename = '$filename';
if (file_exists($filename)) {
echo "<br>$filename latest version: " . date ("Y-m-d H:i:s", filemtime($filename));
$latest_source = date ("YmdHis", filemtime($filename));
}
?>
I need to get this $latest_source value back to the first page to do my checking.
Your suggestions would be appreciated.
Thanks
Chris