-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunction.class.php
More file actions
33 lines (29 loc) · 927 Bytes
/
Copy pathfunction.class.php
File metadata and controls
33 lines (29 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
class corona{
public function getApiGlobal(){
$url = "https://api.kawalcorona.com/";
$data = file_get_contents($url);
return json_decode($data,true);
}
public function getApiIndonesia(){
$url = "https://api.kawalcorona.com/indonesia";
$data = file_get_contents($url);
return json_decode($data,true);
}
public function getTotalPositive(){
$url = "https://api.kawalcorona.com/positif";
$data = file_get_contents($url);
return json_decode($data,true);
}
public function getTotalRecovered(){
$url = "https://api.kawalcorona.com/sembuh";
$data = file_get_contents($url);
return json_decode($data,true);
}
public function getTotalDeaths(){
$url = "https://api.kawalcorona.com/meninggal";
$data = file_get_contents($url);
return json_decode($data,true);
}
}
?>