Getting started with Clash of Clans API
Go to https://developer.clashofclans.com/. Register and set up your token.
Demo 01 : Getting data from Clash of Clans API source in action
  1. Replace <CLANTAG> with your clan tag. Find this in game on your clan screen.
  2. Replace <APITOKEN> with with your API token.
  3. $url can be any of the urls specified by API documentation.
  4. More reading on: curl_init, curl_setopt, curl_exec, json_decode
Demo 02 : Displaying the data source in action
  1. Remove php header function as we are now using HTML to set the charset
  2. Remove var_dump function as we are now using HTML to display the results
  3. Add a way to display any error with fetching data from API
  4. Add the clan name to the <title> tag
  5. Add the clan data (as defined in $data variable) to a set <table>
  6. Loop through the member list (as defined by $members) and add to <tr> tag within a <table> for members of the clan
  7. More reading on: php arrays, isset, echo, foreach, HTML5
Demo 03 : Fixing the display source in action
...
Clan level : 15
KURDISTAN
KURDISTAN#90PG9Q99 Jin Jîjan Azadi ✌🏼 Frau Leben Freiheit ✌🏼 Woman Life Freedom ✌🏼 Kadin Yasamak Özgürlük ✌🏼 #BijîBerxwedanaRojava ✌🏼🇹🇯
Total points55950
Wars won324
War win streak3
Wars drawn
Wars lost
Members50/50
TypeinviteOnly
Required trophies5500
War frequencylessThanOncePerWeek
Clan locationTurkey
1(0) Legend League 209 ⚡️EliteDeniz⚡️
admin
Donated:
0
Received:
0
5909
2(0) Legend League 221 JWAN JAFAR
admin
Donated:
0
Received:
0
5768
3(0) Legend League 215 ⚡️EliteJiYaN⚡️
admin
Donated:
0
Received:
0
5685
4(0) Legend League 230 ⚡️EliteJiYaN⚡️
admin
Donated:
210
Received:
336
5676
5(0) Legend League 211 ⭐️DENIZ⭐️ASO⭐️
admin
Donated:
0
Received:
336
5675
6(0) Legend League 219 ⚡️CUDISEMM 4⚡️
admin
Donated:
42
Received:
576
5664
7(0) Legend League 220 Deniz❤️Prashant
admin
Donated:
144
Received:
342
5658
8(16) Legend League 198 ⚡️EliteJiYaN⚡️2
admin
Donated:
0
Received:
1886
5641
9(0) Legend League 215 ⚡️CUDISEMM⚡️
admin
Donated:
144
Received:
426
5636
10(0) Legend League 210 ⚡️EliteJiYaN⚡️
admin
Donated:
236
Received:
576
5629
11(0) Legend League 213 Deniz⚡️46
admin
Donated:
0
Received:
0
5598
12(0) Legend League 214 ⚡️CUDISEMM 3⚡️
admin
Donated:
182
Received:
336
5595
13(0) Legend League 206 ⚡️EliteJiYaN⚡️
admin
Donated:
320
Received:
1002
5592
14(0) Legend League 210 ⚡️EliteJiYaN⚡️
admin
Donated:
126
Received:
576
5586
15(0) Legend League 203 Deniz⚡️46
admin
Donated:
0
Received:
0
5577
16(0) Legend League 206 Commander
admin
Donated:
0
Received:
0
5538
17(0) Legend League 223 JWAN JAFAR
admin
Donated:
20
Received:
252
5537
18(28) Legend League 198 روناهي
admin
Donated:
0
Received:
1904
5535
19(0) Legend League 208 jan♡♡afrin
admin
Donated:
54
Received:
72
5534
20(29) Legend League 222 MEY$@/\/\
admin
Donated:
1055
Received:
2064
5529
21(0) Legend League 212 Deniz⚡️46
admin
Donated:
0
Received:
0
5524
22(0) Legend League 226 Deniz⚔️Django
coLeader
Donated:
0
Received:
0
5524
23(12) Legend League 215 PAPA Mogambo.
admin
Donated:
200
Received:
1012
5520
24(0) Legend League 196 MadJack
admin
Donated:
0
Received:
0
5503
25(33) Legend League 221 صقور كوردستان
admin
Donated:
299
Received:
1962
5495
26(0) Legend League 236 ✌️MEZOPOTAMYA✌️
admin
Donated:
548
Received:
40
5485
27(0) Legend League 197 ⚡JWAN⚡JIYAN⚡
coLeader
Donated:
510
Received:
534
5479
28(0) Legend League 175 Deniz ⚡️ 46
admin
Donated:
102
Received:
252
5473
29(0) Legend League 212 Ruhi
admin
Donated:
0
Received:
420
5465
30(40) Legend League 226 Azita
admin
Donated:
311
Received:
1494
5451
31(0) Legend League 225 Deniz ⚡️ 46
coLeader
Donated:
1592
Received:
624
5444
32(47) Legend League 185 Sk Iftakher★1
member
Donated:
1062
Received:
1232
5440
33(34) Legend League 196 _ankush:-*
admin
Donated:
206
Received:
1006
5436
34(49) Legend League 225 eb 57
admin
Donated:
2740
Received:
1386
5435
35(0) Legend League 227 pouya
admin
Donated:
126
Received:
720
5426
36(0) Legend League 197 Asqar
admin
Donated:
544
Received:
72
5424
37(42) Legend League 215 UMED leader
admin
Donated:
2813
Received:
2630
5409
38(39) Legend League 205 ⚡ÂRGEŞ⚡
admin
Donated:
9325
Received:
2547
5399
39(0) Legend League 212 ⭐ H♾️K ⭐
coLeader
Donated:
282
Received:
708
5380
40(0) Legend League 216 Cemil & Deniz
member
Donated:
0
Received:
156
5379
41(48) Legend League 235 ROJ
admin
Donated:
192
Received:
1134
5372
42(38) Legend League 230 ⭐ H♾️K ⭐
coLeader
Donated:
199
Received:
776
5369
43(0) Legend League 194 ⚜️Ma7m0u0d⚜️
admin
Donated:
185
Received:
288
5337
44(0) Legend League 215 ⚡️EliteJiYaN⚡️
admin
Donated:
15
Received:
228
5334
45(36) Legend League 230 Ma7m0u0d
coLeader
Donated:
243
Received:
1992
5328
46(45) Legend League 217 ⚡️EliteJiYaN⚡️
leader
Donated:
6724
Received:
2888
5323
47(50) Legend League 218 ابو خليل
admin
Donated:
21140
Received:
1770
5316
48(0) Legend League 210 Deniz⚡️46
admin
Donated:
0
Received:
84
5287
49(41) Legend League 216 Dr.MjdtKy
admin
Donated:
1498
Received:
1944
5208
50(0) Legend League 203 ⚡Servet⚡
coLeader
Donated:
42
Received:
504
5065