Ron, here is my update.dll file:
<?php
/////////////////////////////////////////////////////////////////////////////////////
//
// UPDATE.DLL PHP emulation.
//
// SPg(sm), November, 2006.
//
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
//
// Variables
//
//
$PatchInfo_ver = 91;
$LPServerInfo_ver = 1;
$main_launcher_ver = 717; // Current (new) RF.exe version.
$main_launcher_file_path = 'c:/xamp/htdocs/home'; // Relative path from root RF site.
$LPServerInfo_file_path = 'c:/xamp/htdocs/home'; // Relative path from root RF site.
$PatchInfo_path = 'c:/xamp/htdocs/home'; // Relative path from root RF site.
$use_archive_three = true; // We will use "indexed" patch location.
$main_launcher_host = '192.168.2.101';
$LPServerInfo_host[0] = '192.168.2.101';
// $LPServerInfo_host[1] = '192.168.2.101';
// ...
// $LPServerInfo_host[n] = '192.168.2.101';
$PatchInfo_host[0] = '192.168.2.101';
// $PatchInfo_host[1] = '192.168.2.101';
// ...
// $PatchInfo_host[n] = '192.168.2.101';
/////////////////////////////////////////////////////////////////////////////////////
//
// Functions, and program body.
//
function terminate_script() {
header('Connection: close');
header('Content-Length: 0');
exit;
}
if (!isset($_SERVER['HTTP_USER_AGENT'])) {
// terminate_script();
} elseif (!$_SERVER['HTTP_USER_AGENT']=='HTTP') {
// terminate_script();
} else {
// terminate_script();
}
if (!isset($_SERVER['QUERY_STRING'])) {
terminate_script();
}
$query_ver=$_SERVER['QUERY_STRING'];
if (!is_numeric($_SERVER['QUERY_STRING'])) {
terminate_script();
}
$user_launcher_ver = intval($_SERVER['QUERY_STRING']);
if ($user_launcher_ver < $main_launcher_ver && $user_launcher_ver > 0) {
// 1st request (root site port 80). Check for new RF.exe
// 1st answer if new version exist.
// ------------------------------------------------------------
// -> http://<FQDN|IP>/update.dll?<Launcher_ver>
// sample:
To view the content, you need to sign in or register
$streamtxt = "[Update]\n";
$streamtxt .= "NewVersion=$main_launcher_ver\n";
$streamtxt .= "UpdateFileNumber=1\n";
if ($use_archive_three) {
$streamtxt .= "UpdateFile1=$main_launcher_file_path$main_launcher_ver/newRF.cab\n";
} else {
$streamtxt .= "UpdateFile1=$main_launcher_file_path/newRF.cab\n";
}
$streamtxt .= "ServerNumber=1\n";
$streamtxt .= "Server1=http://$main_launcher_host/\n";
$streamtxt .= "[Launcher]\n";
$streamtxt .= "LauncherVersion=$main_launcher_ver";
echo $streamtxt;
exit;
// 2nd request (root site port 80) with new RF.exe installed version.
// 2nd answer (after loaded and installed new RF.exe) or
// (or ^1st answer if 1st request with valid launcher version)
// --------------------------------------------------------------------
// -> http://<FQDN|IP>:80/update.dll?<new_launcher_ver>
// sample:
To view the content, you need to sign in or register
} elseif ($user_launcher_ver >= $main_launcher_ver) {
$streamtxt = "[Update]\n";
$streamtxt .= "UpdateFileNumber=0";
echo $streamtxt;
exit;
} elseif ($user_launcher_ver == 0) {
if ($_SERVER['SERVER_PORT']==8080) {
// 3rd (or ^2nd) request (root site port 8080), Receive LPServerInfo.dat
// -----------------------------------------------------------------------
// -> http://<FQDN|IP>:8080/update.dll?0
// sample:
To view the content, you need to sign in or register
$streamtxt = "[Update]\n";
$streamtxt .= "NewVersion=$LPServerInfo_ver\n";
$streamtxt .= "UpdateFileNumber=1\n";
if ($use_archive_three) {
$streamtxt .= "UpdateFile1=$LPServerInfo_file_path$LPServerInfo_ver/LPServerInfo.dat\n";
} else {
$streamtxt .= "UpdateFile1=$LPServerInfo_file_path/LPServerInfo.dat\n";
}
$streamtxt .= "ServerNumber=".sizeof($LPServerInfo_host);
for ($i=0; $i<sizeof($LPServerInfo_host); $i++) {
$streamtxt .= "\nServer".($i+1)."=http://".$LPServerInfo_host[$i]."/";
}
echo $streamtxt;
exit;
} elseif ($_SERVER['SERVER_PORT']==10007) {
// 4th (or 3rd^) request (root site port 10007), Receive PatchInfo.z
// -------------------------------------------------------------------
// -> http://<FQDN|IP>:10007/update.dll?0
// sample:
To view the content, you need to sign in or register
$streamtxt = "[Update]\n";
$streamtxt .= "NewVersion=$PatchInfo_ver\n";
$streamtxt .= "UpdateFileNumber=1\n";
if ($use_archive_three) {
$streamtxt .= "UpdateFile1=$PatchInfo_path$PatchInfo_ver/PatchInfo.z\n";
} else {
$streamtxt .= "UpdateFile1=$PatchInfo_path/PatchInfo.z\n";
}
$streamtxt .= "ServerNumber=".sizeof($PatchInfo_host);
for ($i=0; $i<sizeof($LPServerInfo_host); $i++) {
$streamtxt .= "\nServer".($i+1)."=http://".$PatchInfo_host[$i]."/";
}
echo $streamtxt;
exit;
} else {
terminate_script();
}
}
?>
Does the update folders go in the root folder of xamp/htdocs?