From 7cce8f9e6847f4106289e9972b4483b0541e40c2 Mon Sep 17 00:00:00 2001 From: Alpha Date: Sun, 30 Apr 2017 02:14:00 +0200 Subject: [PATCH] Revert "Revert "Avatr fatching ausgelagert + avatar in zeile laden aus array counter"" This reverts commit 90c2993d7677668f0c5facc0b6a94da7c460118c. --- index.php | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 6be6d88..80b3e2c 100644 --- a/index.php +++ b/index.php @@ -37,15 +37,27 @@ $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="; +$avatarid = 0; +$fullids +while($row = $result->fetch_assoc()){ + if($row['deleted']) + continue; + + $id = explode( "/", $row['url']); + + $fullids = $fullids . end($id) . ","; + $number++; +} + +$fullcallurl = $getplayersummarie . $fullcallurl; +$summarie = file_get_contents($fullcallurl); +$temp_summarie = json_decode($fullcallurl, true); while($row = $result->fetch_assoc()){ if($row['deleted']) continue; - $id = explode( "/", $row['url']); - $comburl_summarie = $getplayersummarie . end($id); - $summarie = file_get_contents($comburl_summarie); - $temp_summarie = json_decode($summarie, true); - $avatarurl = $temp_summarie["response"]["players"][0]["avatarmedium"]; + + $avatarurl = $temp_summarie["response"]["players"][$avatarid]["avatarmedium"]; $output = " ".$number." @@ -62,6 +74,7 @@ while($row = $result->fetch_assoc()){ } echo $output; $number++; + $avatarid++; } ?>