1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
<?php
require_once 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$res = $client->request('GET','https://api.worldoftanks.eu/wgn/clans/info/?application_id=8c12c289eb5203d45131fa79e5ef9f58&clan_id=500143851&language=fr');
$data = json_decode($res->getBody(),true);
for ($i = 0; $i < $data['data']['500143851']['members_count']; $i++) {
echo $data['data']['500143851']['members'][$i]['account_name'];
$valid = $data['data']['500143851']['members'][$i]['account_id'];
$res = $client->request('GET',"https://api.worldoftanks.eu/wot/account/tanks/?application_id=8c12c289eb5203d45131fa79e5ef9f58&account_id=" . $valid . "&language=fr");
$data3 = json_decode($res->getBody(),true);
$tank_id = $data3['data'][$valid];
foreach($tank_id as $value){
if($value['tank_id'] == "3937"){
echo " + <b>Type 5 possédé</b>";
}
}
echo "<br/>";
} |
Partager