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 : 13
الزعيم
الزعيم#LP2QQGCJ If they betray treachery ,, we will forgive forgiveness ,, the difference between us is great,,😉
Total points54919
Wars won301
War win streak11
Wars drawn
Wars lost
Members50/50
TypeinviteOnly
Required trophies5500
War frequencyunknown
Clan locationIraq
1(0) Legend League 222 RAFIQUL™8
member
Donated:
0
Received:
47
5644
2(0) Legend League 202 BIJOY MOLLICK 9
member
Donated:
0
Received:
47
5536
3(4) Legend League 221 RAFIQUL™ 02
admin
Donated:
10
Received:
1540
5532
4(0) Legend League 229 Pritom Dada 2™♥
admin
Donated:
0
Received:
0
5528
5(20) Legend League 233 ®€zw@n
admin
Donated:
0
Received:
5581
5521
6(0) Legend League 232 DR.ABDUL HANNAN
admin
Donated:
0
Received:
47
5518
7(0) Legend League 219 shemitu
coLeader
Donated:
0
Received:
47
5516
8(0) Legend League 232 Haider
coLeader
Donated:
11
Received:
0
5512
9(0) Legend League 233 DR. REZAUL HUQ
admin
Donated:
74
Received:
77
5505
10(0) Legend League 219 ✌BD 1971✌
admin
Donated:
0
Received:
603
5501
11(0) Legend League 244 ◀ViperShankar▶
admin
Donated:
0
Received:
41
5495
12(24) Legend League 228 TaPaN EmPirE™
admin
Donated:
844
Received:
6366
5494
13(0) Legend League 213 ✴❇S A Y F U L❇✴
admin
Donated:
0
Received:
47
5494
14(22) Legend League 242 RAFIQUL™ 4
admin
Donated:
2
Received:
2444
5482
15(11) Legend League 229 RAFIQUL™ 5
admin
Donated:
18
Received:
4794
5480
16(0) Legend League 215 ☠️ABU ANAS☠️
admin
Donated:
119
Received:
376
5480
17(0) Legend League 231 ☠️ABU⚜️TIBA☠️
admin
Donated:
0
Received:
47
5479
18(30) Legend League 222 ⭐️ÅBO⭐️FÅHÅD.4
admin
Donated:
77
Received:
2394
5477
19(12) Legend League 223 RAFIQUL ™
admin
Donated:
0
Received:
4918
5477
20(0) Legend League 235 ☆☆T.A.FAHIM☆☆
admin
Donated:
0
Received:
94
5475
21(0) Legend League 238 BAMBEL BEE
admin
Donated:
0
Received:
188
5466
22(0) Legend League 232 DR. REZAUL HUQ
admin
Donated:
6
Received:
235
5464
23(0) Legend League 210 Pritom Dada 3™♥
admin
Donated:
0
Received:
0
5464
24(14) Legend League 219 RAFIQUL™
admin
Donated:
0
Received:
770
5455
25(0) Legend League 242 ✌BDR✌MuKtA®✌vai
admin
Donated:
151
Received:
244
5453
26(0) Legend League 242 Rahim Yar Khan
admin
Donated:
0
Received:
47
5451
27(0) Legend League 232 RAFIQUL™ 3
admin
Donated:
0
Received:
513
5450
28(39) Legend League 237 MD.jony
admin
Donated:
920
Received:
2352
5449
29(0) Legend League 231 DR. SIPON MIZI✌
admin
Donated:
47
Received:
573
5448
30(0) Legend League 212 ❣️Pritom -Dada❣
admin
Donated:
0
Received:
124
5446
31(0) Legend League 224 ☠️ABU ANAS☠️
coLeader
Donated:
191
Received:
423
5444
32(0) Legend League 224 ☠️ESSA☠️
coLeader
Donated:
0
Received:
376
5441
33(33) Legend League 224 ⏩$äbůj p®õďåň⏪™
coLeader
Donated:
30374
Received:
4798
5440
34(0) Legend League 231 Sanjoy Paul
member
Donated:
0
Received:
47
5440
35(0) Legend League 226 ❣️ONOL™ - ROF❣️
admin
Donated:
0
Received:
0
5439
36(0) Legend League 233 KHAN(REZAUL)R.M
admin
Donated:
0
Received:
171
5432
37(0) Legend League 216 DR. J -- TALHA
admin
Donated:
0
Received:
325
5429
38(47) Legend League 255 ❤نــآيــآ❤
leader
Donated:
54580
Received:
7934
5425
39(35) Legend League 229 ﺂڸہٰﹻٰ۪؏ږٰ۪ٱہب✨
admin
Donated:
0
Received:
3746
5422
40(0) Legend League 227 BDB | Ador ™স
member
Donated:
0
Received:
77
5416
41(0) Legend League 224 Abdur
member
Donated:
38
Received:
77
5407
42(0) Legend League 223 DR. SAGOR AKON
admin
Donated:
1
Received:
449
5406
43(42) Legend League 224 ❤Ruhul amin❤
admin
Donated:
2019
Received:
7185
5401
44(46) Legend League 225 Mohammed.H ^.^
coLeader
Donated:
2862
Received:
5777
5398
45(43) Legend League 213 ☠️ESSA☠️
coLeader
Donated:
9
Received:
676
5395
46(0) Legend League 222 ☠ABO HAITHAM☠
admin
Donated:
0
Received:
188
5387
47(37) Legend League 240 ☠️RABEE☠️
coLeader
Donated:
4810
Received:
6097
5380
48(0) Legend League 253 ❤Ruhul amin❤
member
Donated:
36
Received:
154
5366
49(0) Legend League 240 ☠️ABU JUDE☠️
coLeader
Donated:
10
Received:
186
5357
50(0) Titan League I 206 Sarwar Raj
admin
Donated:
548
Received:
0
4730