You need to make a plugin with server command, that will send a JSON string to the console of server, containing players, healths, etc.
Then you make a php script where you execute that command and pick up that string, decode it and work with it.
Sadly, I have no amxx experience, but here's how to do it in SourcePawn. Probably easy to remake for AMXX:
Code:
PrintToServer("[");
for (int i = 1; i<=MaxClients; i++){
if (IsClientInGame(i) && !IsFakeClient(i)){
PrintToServer("{\"name\": \"%s\", \"steamid\": %i, \"k\": %i, \"d\": %i},",sName[i],iSteam[i],GetClientFrags(i),GetClientDeaths(i)); //i put kills and deaths here, you can put health
}
}
PrintToServer("]ArrayEnd");
return Plugin_Handled;
Then, in php script:
PHP Code:
$q = new SourceQuery();
$q->Connect($ip, $port, 3, SourceQuery::SOURCE);
$q->SetRconPassword($password);
$p = $q->Rcon("sm_web_getplayers"); //your command
$pieces = explode("ArrayEnd", $p); //my retarded workaround
$arr = str_replace(",\n]","]",$pieces[0]); //and another one
$players = json_decode($arr, true);
Now you can iterate over $players with foreach and get whatever you need