4- Create a new folder in your xampp/htdocs directory and save your code as a.
It displays clan players data including their clan ranking, name, and donations. The second table is to arrange the clan players list. The first table is to display the clan header data including clan emblem, name, tag, clan information, and description. In the HTML section, two HTML tables were instantiated to organize the fetched data. You can also mess with the colors and styles all you want and see how it turns out. In the HTML section, some CSS was written for the web page to look nice. $clantag = "#GCPPGY8" $token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiIsImtpZCI6IjI4YTMxOGY3LTAwMDAtYTFlYi03ZmExLTJjNzQzM2M2Y2NhNSJ9.eyJpc3MiOiJzdXBlcmNlbGwiLCJhdWQiOiJzdXBlcmNlbGw6Z2FtZWFwaSIsImp0aSI6IjgxYThhOGVkLTliZjQtNDJkYS05MDdhLTk1ZDk2Y2RkZWMwMyIsImlhdCI6MTU2NTQ3OTM2Nywic3ViIjoiZGV2ZWxvcGVyL2FiZGQwZmM2LTQ3ODktNzhmOC1iZmVhLTVkMWZjMTBiZWQ0YSIsInNjb3BlcyI6WyJjbGFzaCJdLCJsaW1pdHMiOlt7InRpZXIiOiJkZXZlbG9wZXIvc2lsdmVyIiwidHlwZSI6InRocm90dGxpbmcifSx7ImNpZHJzIjpbIjM3LjM4LjIyMC4zMiJdLCJ0eXBlIjoiY2xpZW50In1dfQ.4Z8vPQr6m19yl-4ljDT_GYSZ9kahRZD2xhfClZojnW7imD9siEDGkrb3YdRetgNmQHeIEvQ6YhQxTxHxWAuMMQ".
The clan I want to fetch the info of has the tag #GCPPGY8, and my token was shown in the previous screenshot, so my code will look like this. Copy your token from key info, and replace it with in your code. Replace the tag of the clan you want to fetch the information of with.
In the PHP code section starting with the and. urlencode($clantag) $ch = curl_init($url) $headr = array() $headr = "Accept: application/json" $headr = "Authorization: Bearer ".$token 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) $res = curl_exec($ch) $data = json_decode($res, true) curl_close($ch) if (isset($data)) ?> " alt=""/> Total points Wars won War win streak Wars drawn Wars lost -> Members/50 Type Required trophies War frequency Clan location " alt=""/> ", $member, "", $member, "" ?> Donated: Received: Trophies: 3- In Sublime Text 3(or any text editor/IDE you’re using) write the following code (no worries I will explain it in a minute): " $token = "" $url = " ".