From 8c98594da8d60e1d0d809cbe9d82704004a4fa91 Mon Sep 17 00:00:00 2001 From: Alpha Date: Sun, 30 Apr 2017 05:03:27 +0200 Subject: [PATCH] Ban Checker Integriert --- index.php | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 13809ae..41d9e75 100644 --- a/index.php +++ b/index.php @@ -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 = " ".$number."