Results 1 to 3 of 3

Thread: Need help in current war api

  1. #1

    Need help in current war api

    How to list the member in war according map position?
    PHP Code:
    <?php
    $token 
    "SECRET";
    $clan_tag $_GET['tag'];
    $clan_tag substr_replace($clan_tag,"#",0,0);

    $url "https://api.clashofclans.com/v1/clans/" urlencode($clan_tag)."/currentwar";
    $ch curl_init($url);
    $headr = array();$headr[] = "Accept: application/json";
    $headr[] = "Authorization: Bearer ".$token;
    curl_setopt($chCURLOPT_HTTPHEADER$headr);
    curl_setopt($chCURLOPT_SSL_VERIFYHOSTfalse);
    curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
    curl_setopt($chCURLOPT_RETURNTRANSFER1); 
    $res curl_exec($ch);
    $data json_decode($restrue);
    curl_close($ch);

    if (isset(
    $data["reason"])) { 
    $errormsg true;
    }
    ?>

    <?php
    foreach ($data["clan"]["members"] as $member) {
    ?>
    Last edited by xing1225; June 13th, 2019 at 10:39 AM.

  2. #2
    Fresh Spawn
    Join Date
    Apr 2019
    Posts
    5
    Do you want to have the data like this https://akchauhan2.com/map/29QVJ8PLC

  3. #3
    Quote Originally Posted by avps3412 View Post
    Do you want to have the data like this https://akchauhan2.com/map/29QVJ8PLC
    Yes, can you help me?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •