示例#1
0
// if(true){
if (isset($_POST['servor']) && isset($_POST['summoner'])) {
    $server = $_POST['servor'];
    $summoner = $_POST['summoner'];
    // $server="euw";
    // $summoner="paigeounette";
    $api = new riotapi($server, new FileSystemCache('cache/'));
    try {
        //Recherche de l'invocateur par son nom
        $r = $api->getSummonerByName($summoner);
        foreach ($r as $r) {
            $id = $r['id'];
        }
        try {
            //Recherche de la liste des match en SoloQ
            $r = $api->getMatchList($id, "RANKED_SOLO_5x5");
            // /*
            //Initialisation des variables et des tableaux;
            $stop = 0;
            $arrayIds = array();
            $total = array();
            $total['nbMatches'] = 0;
            $total['AFK'] = 0;
            $total['AFKtargetTeam'] = 0;
            $total['AFKotherTeam'] = 0;
            $total['TargetTeam'] = array("1" => 0, "2" => 0, "3" => 0);
            $total['OtherTeam'] = array("1" => 0, "2" => 0, "3" => 0);
            $total['GamesTargetTeam'] = 0;
            $total['GamesOtherTeam'] = 0;
            $total['GamesWithAFK'] = 0;
            $total["ownAFK"] = 0;