Avatare werden nun mittels einer Solo anfrage geladen 1 api call / Sortierung ist noch nicht sicher
This commit is contained in:
parent
d0e5bcb9c8
commit
cd9f31d974
1 changed files with 26 additions and 5 deletions
31
index.php
31
index.php
|
@ -37,15 +37,35 @@ $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 = "";
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
if($row['deleted'])
|
||||
continue;
|
||||
|
||||
$id = explode( "/", $row['url']);
|
||||
|
||||
$fullids = $fullids . end($id) . ",";
|
||||
|
||||
}
|
||||
$fullcallurl = $getplayersummarie . $fullids;
|
||||
$summarie = file_get_contents($fullcallurl);
|
||||
$temp_summarie = json_decode($summarie, true);
|
||||
|
||||
mysqli_data_seek($result, 0);
|
||||
?>
|
||||
<?php
|
||||
|
||||
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 = "<tr>
|
||||
<td>".$number."</td>
|
||||
|
@ -62,6 +82,7 @@ while($row = $result->fetch_assoc()){
|
|||
}
|
||||
echo $output;
|
||||
$number++;
|
||||
$avatarid++;
|
||||
}
|
||||
?>
|
||||
</table><br>
|
||||
|
|
Reference in a new issue