День добрый.
После вставки на страницу сайта данного кода, страница перестала открываться и пишет HTTP ERROR 500.
Умельцы, гляньте, пожалуйста. Я не в состоянии найти ошибку самостоятельно в связи с тем, что в PHP всего 3-тий день :(
<div class="panel panel-default">
<?php
include("db_connect.php");
$steamIds = [];
$usersData = [];
$query = "SELECT * FROM users_profiles ORDER BY `id` DESC limit 15";
$result = mysqli_query($query) or die("Request failed");
while ($row = mysqli_fetch_assoc($result)) {
$usersData[$row['steam_id']] = $row;
$steamIds = $row['steam_id']
}
$url = "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=" . $steamauth['apikey'] . "&steamids=" , join(',', $steamIds);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$uuser);
$result=curl_exec($ch);
curl_close($ch);
$steamData = json_decode($result, true);
foreach($steamData['response']['players'] as &$player) {
$usersData[$player['steamid']]['steam_avatar'] = $player['avatarfull'];
$usersData[$player['steamid']]['steam_name'] = $player['personaname'];
}
$chunked = array_chunk($usersData, 3);
?>
<table class="table table-striped table-responsive table-bordered">
<tbody>
<?php foreach($chunked as &$chunked_row): ?>
<tr>
<?php foreach($chunked_row as &$chunked_cell): ?>
<td>
<center>
<img src="<?= htmlspecialchars($chunked_cell['steam_avatar']); ?>" width="50px" height="50px"/>
<?= htmlspecialchars($chunked_cell['steam_avatar']); ?>
</center>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>