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 : 1
TORETO HER YRDE
TORETO HER YRDE#22V2YYQGR DOSTLUK DÜNYA MENFAATLERİYLE OLUSACAK BİR ŞEY DEĞİLDİR... THANKS TO MUJTABA AND ASO BRO ❤️ RECEP. DEVRAN. ÖMER. TAYFUN. TORETTTTTOOOOOOO ❄️❄️❄️🤫 İNSTAGRAM: coc_toreto ❤️
Total points56736
Wars won0
War win streak0
Wars drawn
Wars lost
Members47/50
Typeclosed
Required trophies5500
War frequencynever
Clan locationTurkey
1(0) Legend League 201 HOÀ
admin
Donated:
25
Received:
210
6325
2(0) Legend League 228 Steph
admin
Donated:
0
Received:
280
6178
3(0) Legend League 216 Gonzo III
member
Donated:
0
Received:
282
6067
4(0) Legend League 193 stephanie
coLeader
Donated:
0
Received:
168
5858
5(0) Legend League 222 Dr Mujtaba
admin
Donated:
29
Received:
536
5839
6(0) Legend League 211 ⭐️ ASO ⭐️
coLeader
Donated:
0
Received:
126
5796
7(0) Legend League 206 ⭐️ ASO ⭐️
coLeader
Donated:
0
Received:
126
5788
8(0) Legend League 228 stephanie2
coLeader
Donated:
15
Received:
168
5768
9(0) Legend League 217 Dr Mujtaba
member
Donated:
15
Received:
536
5736
10(0) Legend League 207 steph 2
admin
Donated:
10
Received:
168
5710
11(0) Legend League 222 ⭐️ ASO ⭐️
coLeader
Donated:
0
Received:
288
5683
12(0) Legend League 217 Dr Mujtaba
coLeader
Donated:
59
Received:
168
5674
13(0) Legend League 210 ⭐️ ASO ⭐️
coLeader
Donated:
0
Received:
86
5667
14(0) Legend League 215 Gonzteph
admin
Donated:
0
Received:
168
5661
15(0) Legend League 218 stephy
coLeader
Donated:
32
Received:
168
5635
16(0) Legend League 212 Dr Mujtaba
member
Donated:
0
Received:
168
5633
17(0) Legend League 220 Gonzo
admin
Donated:
0
Received:
168
5614
18(0) Legend League 222 Dr Mujtaba
member
Donated:
0
Received:
168
5609
19(0) Legend League 203 Dr Mujtaba
member
Donated:
45
Received:
576
5583
20(0) Legend League 218 ⚡️steph⚡️
coLeader
Donated:
0
Received:
237
5573
21(0) Legend League 206 ⭐️ ASO ⭐️
coLeader
Donated:
17
Received:
128
5572
22(0) Legend League 234 Hoà~Stéph
admin
Donated:
0
Received:
168
5571
23(0) Legend League 214 Dr Mujtaba
coLeader
Donated:
0
Received:
392
5570
24(0) Legend League 206 SİNAN ÇETİN
admin
Donated:
2
Received:
240
5568
25(0) Legend League 220 THE COLLECTOR
member
Donated:
0
Received:
124
5568
26(0) Legend League 223 DîlBîrîñ
member
Donated:
10
Received:
300
5548
27(0) Legend League 210 Dr Mujtaba
admin
Donated:
0
Received:
360
5526
28(0) Legend League 209 Dr Mujtaba
admin
Donated:
0
Received:
360
5514
29(0) Legend League 211 Dr Mujtaba
member
Donated:
135
Received:
168
5514
30(0) Legend League 211 Dr Mujtaba
admin
Donated:
0
Received:
352
5507
31(0) Legend League 215 Masum Aman 2
admin
Donated:
160
Received:
299
5499
32(0) Legend League 195 Dr Mujtaba
member
Donated:
15
Received:
210
5490
33(0) Legend League 224 STEPHY
coLeader
Donated:
0
Received:
300
5490
34(0) Legend League 242 ⭐️ EREN 21 ⭐️
admin
Donated:
680
Received:
0
5480
35(0) Legend League 235 kuvai⚡️RAGNAR
leader
Donated:
878
Received:
319
5477
36(0) Legend League 212 Dr Mujtaba
admin
Donated:
0
Received:
210
5474
37(0) Legend League 215 Dr Mujtaba
admin
Donated:
0
Received:
210
5468
38(0) Legend League 222 Masum Aman 4
member
Donated:
55
Received:
294
5467
39(0) Legend League 207 Dr Mujtaba
member
Donated:
75
Received:
210
5444
40(0) Legend League 225 Masum Aman
coLeader
Donated:
539
Received:
336
5442
41(0) Legend League 215 Dr Mujtaba
admin
Donated:
0
Received:
312
5423
42(0) Legend League 221 Dr Mujtaba
member
Donated:
135
Received:
210
5422
43(0) Legend League 176 Masum Aman 3
member
Donated:
15
Received:
294
5413
44(0) Legend League 207 Dr Mujtaba
admin
Donated:
0
Received:
210
5407
45(0) Legend League 212 Dr Mujtaba
admin
Donated:
0
Received:
280
5400
46(0) Champion League II 261 Stephanie❤️Dr M
coLeader
Donated:
6227
Received:
216
3508
47(0) Master League I 250 Masum Aman
coLeader
Donated:
3242
Received:
42
3107