4
1
Fork 0

Ban Checker Integriert

This commit is contained in:
Alpha 2017-04-30 05:03:27 +02:00
parent 24fe95fd8a
commit 8c98594da8

View file

@ -37,6 +37,7 @@ $sql = "SELECT * FROM cheaterlist ORDER BY addtime DESC;";
$result = $conn->query($sql);
$number = 1;
$getplayersummarie ="http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=E8D51260E5DF95AE8A6DA139D6C80288&steamids=";
$getplayerbans = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=E8D51260E5DF95AE8A6DA139D6C80288&steamids=";
$avatarid = 0;
$fullids = "";
$counter = 0;
@ -56,13 +57,23 @@ while ($row = $result->fetch_assoc()) {
$counter++;
}
$fullcallurl = $getplayersummarie . $fullids;
$summarie = file_get_contents($fullcallurl);
$temp_summarie = json_decode($summarie, true);
mysqli_data_seek($result, 0);
$fullcallurl_summarie = $getplayersummarie . $fullids;
$fullcallurl_bans = $getplayerbans . $fullids;
$summarie = file_get_contents($fullcallurl_summarie);
$temp_summarie = json_decode($summarie, true);
$bans = file_get_contents($fullcallurl_bans);
$temp_bans = json_decode($bans, true);
/*ID PICTURE SORT ALPHA*/
/*BAN Sorter*/
$pattern =explode( ",", $fullids);
@ -72,9 +83,14 @@ while ($counter2 < $counter) {
$avaid = $temp_summarie["response"]["players"][$avatarid]["avatarmedium"];
$userid = $temp_summarie["response"]["players"][$avatarid]["steamid"];
$personname = $temp_summarie["response"]["players"][$avatarid]["personaname"];
$gameban_output = $temp_bans["players"][$avatarid]["NumberOfGameBans"];
$vacban_output = $temp_bans["players"][$avatarid]["NumberOfVACBans"];
$sort["$userid"] = $avaid;
$sort_name["$userid"] = $personname;
$sort_bans["$userid"]["gameban"] = $gameban_output;
$sort_bans["$userid"]["vacban"] = $vacban_output;
$avatarid++;
$counter2++;
@ -93,6 +109,14 @@ while($row = $result->fetch_assoc()){
$avatarurl = $sort["$ida"];
$person = $sort_name["$ida"];
$gamebancheck = $sort_bans["$ida"]["gameban"];
$vacbancheck = $sort_bans["$ida"]["vacban"];
/*ban saver*/
if($gamebancheck || $vacbancheck > 0){
$row['banned'] = 1;
}
$output = "<tr>
<td>".$number."</td>