Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: Lake
- * Date: 13/02/2016
- * Time: 18:15
- */
- ini_set('max_execution_time', 3600);
- $url = "http://logs.tf/json_search?player=76561198043755694";
- $url2 = "http://logs.tf/json/";
- $liste = json_decode(file_get_contents($url));
- $res = array();
- foreach($liste->logs as $el)
- {
- $i++;
- $log = json_decode(file_get_contents($url2.$el->id));
- $soldier = false;
- foreach($log->players as $k=>$player)
- {
- if($k == "[U:1:83489966]")
- {
- foreach($player->class_stats as $class)
- {
- if($class->type == "soldier")
- {
- $soldier = true;
- }
- }
- }
- }
- if($soldier)
- {
- foreach($log->healspread as $heal)
- {
- $blitzo = false;
- $total = 0;
- foreach($heal as $k =>$pheal)
- {
- $total = $total + $pheal;
- if($k =="[U:1:83489966]")
- {
- $blitzo = $pheal;
- }
- }
- if($blitzo)
- {
- $pourcent = round($blitzo/$total * 100,2);
- if($pourcent>23)
- {
- $res[$el->id] = $pourcent;
- }
- }
- }
- }
- }
- echo '<table border="1">';
- foreach($res as $k=>$ares)
- {
- echo "<tr><td>$k</td><td>$ares</td></tr>";
- }
- echo "</table>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement