PHP Classes

PHP CoronaVirus Database API from NCDC: Provide CoronaVirus data and serve its as an API

Recommend this page to a friend!
  Info   View files Example   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 59 This week: 1All time: 10,473 This week: 560Up
Version License PHP version Categories
ncdc 1.0.0The PHP License5PHP 5, Web services, Geography, Parsers, H...
Description 

Author

This package is specific mainly for applications used in Nigeria Nigeria .

This package can provide CoronaVirus data and serve its as an API.

It can access the Nigeria Centre for Disease Control site dedicated to publishing the CoronaVirus statistics and parses its pages to extract the current statistics values about the evolution of the disease in Nigeria.

The package returns an array with total numbers that can be served as an API response which includes the total number of confirmed cases, the total number of active cases, total number of recovered_cases and the total number of dead cases.

Picture of Busari Ridwan
  Performance   Level  
Name: Busari Ridwan <contact>
Classes: 4 packages by
Country: Nigeria Nigeria
Age: ???
All time rank: 345724 in Nigeria Nigeria
Week rank: 416 Up8 in Nigeria Nigeria Up
Innovation award
Innovation award
Nominee: 3x

Example

<?php

require "vendor/autoload.php";

header("Access-Control-Allow-Origin: *");
header("HTTP/1.1 200 OK");
header("Content-Type: application/json; charset=UTF-8");

$response = (new \App\Services\ScrapNcdcWebsite())->run();

echo
json_encode($response, JSON_PRETTY_PRINT);



Details

NCDC

This scripts scraps COVID19 data from NCDC official website and return it in a json response that can be used as an API

The endpoint is located in the following URL : https://pacific-coast-07995.herokuapp.com/


  Files folder image Files  
File Role Description
Files folder image.idea (6 files)
Files folder imageapp (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .idea  
File Role Description
  Accessible without login Plain text file misc.xml Data Auxiliary data
  Accessible without login Plain text file modules.xml Data Auxiliary data
  Accessible without login Plain text file NCDC.iml Data Auxiliary data
  Accessible without login Plain text file php.xml Data Auxiliary data
  Accessible without login Plain text file vcs.xml Data Auxiliary data
  Accessible without login Plain text file workspace.xml Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageServices (2 files)

  Files folder image Files  /  app  /  Services  
File Role Description
  Plain text file BaseService.php Class Class source
  Plain text file ScrapNcdcWebsite.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:59
This week:1
All time:10,473
This week:560Up