Rose Knight
Elite
Sino po may API Jan Ng covid 19 tracker ung updated po . Balak ko Kasi gumawa dito sa city namin for personal project Lang po para maka pagpractice Lang din
Pano gamitin to paps hahah salamatYou do not have permission to view the full content of this post. Log in or register now.
May installation guide naman po yan sa mismong link sa github. Gamit ko yan noon nang ayos pa yung datasheets for this program sa You do not have permission to view the full content of this post. Log in or register now. Sa palagay ko, may kaunting babaguhin pa para updated dahil old data ang lumalabas using Postman API nang i-simulate ko ulit.Pano gamitin to paps hahah salamat
{"updated":1608853843608,"country":"Philippines","countryInfo":{"_id":608,"iso2":"PH","iso3":"PHL","lat":13,"long":122,"flag":"https://disease.sh/assets/img/flags/ph.png"},"cases":465724,"todayCases":1776,"deaths":9055,"todayDeaths":7,"recovered":430490,"todayRecovered":533,"active":26179,"critical":708,"casesPerOneMillion":4223,"deathsPerOneMillion":82,"tests":6594381,"testsPerOneMillion":59799,"population":110276686,"continent":"Asia","oneCasePerPeople":237,"oneDeathPerPeople":12179,"oneTestPerPeople":17,"activePerOneMillion":237.39,"recoveredPerOneMillion":3903.73,"criticalPerOneMillion":6.42}
<?php
header('Content-Type: application/json');
$country = "philippines";
$url = "https://corona.lmao.ninja/v3/covid-19/countries/".$country;
$data = json_decode(file_get_contents($url, false));
echo json_encode($data);
?>
<?php
$country = "philippines";
$url = "https://corona.lmao.ninja/v3/covid-19/countries/".$country;
$data = json_decode(file_get_contents($url, false));
?>
<!DOCTYPE html>
<html>
<head>
<title>COVID-19 Updates</title>
</head>
<body>
<h1>COVID-19 Updates</h1>
<div>
<h2>Country: <?= $data->country ?></h2>
<h3>Total Cases: <?= number_format($data->cases) ?></h3>
<h3>Total Deaths: <?= number_format($data->deaths) ?></h3>
<h3>Total Recovered: <?= number_format($data->recovered) ?></h3>
</div>
</body>
</html>