console.log('".$data."');\n"; } include("credentials.php"); include("coc_api_keys.php"); $api_key = $production_key1; $url = 'https://api.clashofclans.com/v1/clans/%23QLPPJJJR'; $headr = array(); $headr[] = 'Accept: application/json'; $headr[] = 'Authorization: Bearer '.$api_key; $ch = curl_init(htmlspecialchars($url)); curl_setopt($ch, CURLOPT_HTTPHEADER, $headr); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($ch); $json = json_decode($result, true); $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); debug_to_console( "HTTP Response : ".$http_status_code ); $newline = "\n"; echo '
'.$newline; echo ''.$newline; echo '
'.$newline; echo '
'.$json['name'].'
'.$newline; echo '
Total Points '.$json['clanPoints'].'
'.$newline; echo '
'.$newline; echo '
Wars Won: '.$json['warWins'].'
'.$newline; echo '
'.$newline; echo '
Wars Lost '.$json['warLosses'].'
'.$newline; echo '
'.$newline; echo '
War Win Streak '.$json['warWinStreak'].'
'.$newline; echo '
'.$newline; echo '
Members '.$json['members'].'/50
'.$newline; echo '
'.$newline; echo '
Location '.$json['location']['name'].'
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '

'.$json['description'].'

'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; foreach($json['memberList'] as $player){ echo ''.$newline; echo '
'.$newline; echo '
'.$newline; echo ''.$newline; echo '
'.$newline; echo '
'.$newline; echo ''.$newline; echo ''.$player['expLevel'].''.$newline; echo '
'.$newline; echo '
'.$newline; echo ''.$player['name'].'
'.$newline; echo ''.$player['role'].''.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo ' Troops Donated '.$newline; echo '
'.$player['donations'].'
'.$newline; echo '
'.$newline; echo '
'.$newline; echo ' Troops Received '.$newline; echo '
'.$player['donationsReceived'].'
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo ''.$newline; echo ''.$player['trophies'].''.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; echo '
'.$newline; } echo '
'.$newline; ?>