CSGOWinBig
CSGOWinBig copied to clipboard
Can you please add a top winners page
Can you please add a page with the top 20 winners (in terms of total value won over all games)
.
apikey = "YOURAPIKEY"; // put your API key here $user->domain = "http://csbox.pl"; // put your domain ``` class user { public static $apikey; public static $domain; public function GetPlayerSummaries($steamid) { $response = file_get_contents('http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=' . $this->apikey . '&steamids=' . $steamid); $json = json_decode($response); return $json->response->players[0]; } } $mysql_server = "MYSQLADRESS"; $mysql_admin = "MYSQLADMIN"; $mysql_pass = "MYSQLPASSWORD"; $mysql_db = "MYSQLDATABASE"; mysql_connect($mysql_server, $mysql_admin, $mysql_pass) or die('Niestety nie udalo nam sie polaczyc z baza danych.'); mysql_select_db($mysql_db) or die('Nie mozemy odnalesc podanej bazy danych.'); $db = mysql_connect($mysql_server, $mysql_admin, $mysql_pass); mysql_select_db($mysql_db, $db); $getFarciarz = mysql_query("SELECT potPrice,userPutInPrice,winnerSteamId64 FROM history Order by potPrice DESC LIMIT 3"); while ($row = mysql_fetch_array($getFarciarz)) { $potPrice = $row['potPrice']; $putIn = $row['userPutInPrice']; $chanse = $putIn / $potPrice * 100; $chanse = number_format($chanse, 2, '.', ''); $potPrice = $potPrice / 100; ?> <img alt='avatar from steam user' src="<?php echo $user->GetPlayerSummaries($row['winnerSteamId64'])->avatar; ?>" style="width: 100px; height: 100px; border-radius: 100px;">
<br>
<h4 style="font-size:14px;"><?php echo $user->GetPlayerSummaries($row['winnerSteamId64'])->personaname; ?></h4>
<h4>
Wygrał/a: <span >$<?php echo $potPrice ?></span>
<br>
Szansa: <span ><?php echo $chanse ?>%</span>
</h4>
<hr>
<?php
}
?>
@Xeroner I think it would be better if the players stats are like Games Played: x Overall won: x Highest win: x
@GreYzZ So do it :) :+1:
unfortunately i can't