https://github.com/akmalfairuz/coronavirusdataapi
A PHP API for getting cases, recovered, deaths cause COVID-19. Source: https://www.worldometers.info/coronavirus/
https://github.com/akmalfairuz/coronavirusdataapi
Last synced: 2 months ago
JSON representation
A PHP API for getting cases, recovered, deaths cause COVID-19. Source: https://www.worldometers.info/coronavirus/
- Host: GitHub
- URL: https://github.com/akmalfairuz/coronavirusdataapi
- Owner: AkmalFairuz
- Created: 2020-03-19T10:02:01.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-10T00:58:10.000Z (about 5 years ago)
- Last Synced: 2025-03-11T01:49:38.665Z (2 months ago)
- Language: PHP
- Size: 26.4 KB
- Stars: 8
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CoronavirusDataAPI
A PHP API to get cases, recovered and deaths count cause COVID-19 virus. Source: https://www.worldometers.info/coronavirus/# API Usage
```
require_once "CoronaStatsAPI.php";$covid = new CoronavirusDataAPI;
echo $covid->getCases("Indonesia"); // get cases
echo $covid->getDeaths("Italy"); // get deaths
echo $covid->getRecovered("Spain"); // get recovered
echo $covid->getTodayCases("Singapore"); // get today/new cases
echo $covid->getTodayDeaths("China"); // get today/new deaths
echo $covid->getAllCases(); // get cases from all country
echo $covid->getAllDeaths(); // get deaths from all country
echo $covid->getAllRecovered(); // get recovered from all country
echo $covid->getAllTodayCases(); // get today/new cases from all country
echo $covid->getAllTodayDeaths(); // get today/new deaths from all country
var_dump($covid->getAll("Malaysia")); // get cases,deaths and recovered as array
var_dump($covid->getCountryCases()); // get all country name infected as array
```