$key, "query" => $query);
return http_build_query($data);
}
function request_exec($data){
echo $data;
$output = file_get_contents(API_URL . $data);
$output = json_decode($output);
#$output = API_URL . $data;
return $output;
}
function gen_html($ip, $port, $active){
return "
$ip:$port
";
}
function build_all($json){
$serverlist = "";
foreach($json->matches as $match){
$ip = $match->ip_str;
$port = $match->port;
if(strpos($match->data,"Online Players: 0") !== false){
$active = "false";
} else{
$active = "true";
}
$serverlist = $serverlist . gen_html($ip, $port, $active);
}
$header = "
k0rnh0li0's grief list with Getgle Characteristics
k0rnh0li0's grief list with Getgle Characteristics
100 most recently indexed minecraft 1.17.1 servers.
Updated every 2 mins.
SOURCE CODE HERE
Red = players are online
";
file_put_contents(OUTPUT_FILE, $header . $serverlist);
}
$json = request_exec(
request_construct()
);
build_all($json);