So, I'm lost and can't find anything anywhere related to this issue.
So I am getting this once I set things up.

I am running a Virtual Box,
192.168.10.213

updater.php

init.lua (before encryption)
Virtual box information


So I am getting this once I set things up.

I am running a Virtual Box,
192.168.10.213

updater.php
LUA:
<?php
// CONFIG
$files_dir = "/var/www/html/otcv8/files";
$files_url = "http://192.168.10.213/otcv8/files";
$files_and_dirs = array("init.lua", "data", "modules", "layouts");
$checksum_file = "checksums.txt";
$checksum_update_interval = 60; // seconds
$binaries = array(
"WIN32-WGL" => "otclient_gl.exe",
"WIN32-EGL" => "otclient_dx.exe",
"WIN32-WGL-GCC" => "otclient_gcc_gl.exe",
"WIN32-EGL-GCC" => "otclient_gcc_dx.exe",
"X11-GLX" => "otclient_linux",
"X11-EGL" => "otclient_linux",
"ANDROID-EGL" => "", // we can't update android binary
"ANDROID64-EGL" => "" // we can't update android binary
);
// CONFIG END
function sendError($error) {
echo(json_encode(array("error" => $error)));
die();
}
$raw_input = file_get_contents("php://input");
$data = json_decode($raw_input);
if (!$data || !is_object($data)) {
sendError("Invalid input data. Ensure the request payload is valid JSON.");
}
$version = isset($data->version) ? $data->version : 0; // Default to 0 if not set
$build = isset($data->build) ? $data->build : ""; // Default to empty string if not set
$os = isset($data->os) ? $data->os : "unknown"; // Default to "unknown" if not set
$platform = isset($data->platform) ? $data->platform : ""; // Default to empty string if not set
$args = isset($data->args) ? $data->args : null; // Default to null if not set
$binary = $binaries[$platform] ?: "";
$cache = null;
$cache_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $checksum_file;
if (file_exists($cache_file) && (filemtime($cache_file) + $checksum_update_interval > time())) {
$cache = json_decode(file_get_contents($cache_file), true);
}
if(!$cache) { // update cache
$dir = realpath($files_dir);
$rii = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));
$cache = array();
foreach ($rii as $file) {
if (!$file->isFile())
continue;
$path = str_replace($dir, '', $file->getPathname());
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
$cache[$path] = hash_file("crc32b", $file->getPathname());
}
file_put_contents($cache_file . ".tmp", json_encode($cache));
rename($cache_file . ".tmp", $cache_file);
}
$ret = array("url" => $files_url, "files" => array(), "keepFiles" => false);
foreach($cache as $file => $checksum) {
$base = trim(explode("/", ltrim($file, "/"))[0]);
if(in_array($base, $files_and_dirs)) {
$ret["files"][$file] = $checksum;
}
if($base == $binary && !empty($binary)) {
$ret["binary"] = array("file" => $file, "checksum" => $checksum);
}
}
echo(json_encode($ret, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
?>

init.lua (before encryption)
LUA:
Services = {
website = "http://192.168.10.213",
updater = "http://192.168.10.213/otcv8/updater.php",--"http://yourwebsite/api/updater.php"
stats = "", -- --"http://yourwebsite/api/stats.php"
crash = "", --"http://yourwebsite/api/crash.php",
feedback = "",--"http://yourwebsite/api/feedback.php",
status = "" --http://yourwebsite/api/status.php"
}
Virtual box information
LUA:
a@a:/var/www/html/otcv8/files$ curl -X POST -H "Content-Type: application/json" -d '{}' http://192.168.10.213/otcv8/updater.php
{
"url": "http://192.168.10.213/otcv8/files",
"files": {
"/data/shaders/outfit_rainbow_vertex.frag": "cfe6e637",
"/data/shaders/outfit_rainbow_fragment.frag": "6932dffb",
"/data/shaders/map_rainbow_fragment.frag": "f68e6fff",
// Lot more info, removed due to limitations of otland characters
},
"keepFiles": false
}a@a:/var/www/html/otcv8/files$

