PHP code example of sapistudio / newsapi
1. Go to this page and download the library: Download sapistudio/newsapi library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sapistudio / newsapi example snippets
use SapiStudio\NewsApi\NewsApi;
$api = new NewsApi(api_key);
$api->getTopHeadLines();
$api->getEverything($searchText);
$api->getSources($searchText);