Hab nen sortieralgo geschrieben der den fehler von steam mittels eines arrays behebt bilder sind nun sortiert.
This commit is contained in:
parent
cd9f31d974
commit
bd96be579a
1 changed files with 27 additions and 2 deletions
29
index.php
29
index.php
|
@ -39,6 +39,8 @@ $number = 1;
|
|||
$getplayersummarie ="http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=E8D51260E5DF95AE8A6DA139D6C80288&steamids=";
|
||||
$avatarid = 0;
|
||||
$fullids = "";
|
||||
$counter = 0;
|
||||
$counter2 = 0;
|
||||
|
||||
?>
|
||||
|
||||
|
@ -51,6 +53,7 @@ while ($row = $result->fetch_assoc()) {
|
|||
$id = explode( "/", $row['url']);
|
||||
|
||||
$fullids = $fullids . end($id) . ",";
|
||||
$counter++;
|
||||
|
||||
}
|
||||
$fullcallurl = $getplayersummarie . $fullids;
|
||||
|
@ -58,6 +61,23 @@ $summarie = file_get_contents($fullcallurl);
|
|||
$temp_summarie = json_decode($summarie, true);
|
||||
|
||||
mysqli_data_seek($result, 0);
|
||||
|
||||
/*ID PICTURE SORT ALPHA*/
|
||||
|
||||
$pattern =explode( ",", $fullids);
|
||||
|
||||
|
||||
|
||||
while ($counter2 < $counter) {
|
||||
$avaid = $temp_summarie["response"]["players"][$avatarid]["avatarmedium"];
|
||||
$userid = $temp_summarie["response"]["players"][$avatarid]["steamid"];
|
||||
|
||||
$sort["$userid"] = $avaid;
|
||||
|
||||
$avatarid++;
|
||||
$counter2++;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php
|
||||
|
||||
|
@ -65,7 +85,12 @@ while($row = $result->fetch_assoc()){
|
|||
if($row['deleted'])
|
||||
continue;
|
||||
|
||||
$avatarurl = $temp_summarie["response"]["players"][$avatarid]["avatarmedium"];
|
||||
$id = explode( "/", $row['url']);
|
||||
$ida = end($id);
|
||||
|
||||
$avatarurl = $sort["$ida"];
|
||||
|
||||
|
||||
|
||||
$output = "<tr>
|
||||
<td>".$number."</td>
|
||||
|
@ -82,7 +107,7 @@ while($row = $result->fetch_assoc()){
|
|||
}
|
||||
echo $output;
|
||||
$number++;
|
||||
$avatarid++;
|
||||
|
||||
}
|
||||
?>
|
||||
</table><br>
|
||||
|
|
Reference in a new issue