File: news.php

Recommend this page to a friend!
  Classes of Ahmad mustapha  >  PHP Download URL Content  >  news.php  >  Download  
File: news.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Download URL Content
Automate download of files from different sites
Author: By
Last change:
Date: 17 days ago
Size: 294 bytes
 

Contents

Class file image Download
<?php
use App\Utils\News;

require(
'vendor/autoload.php');

$site = $_GET['site'] ?? null;
if(
$site && $site != 'all'){
   
$newsList = News::$site()->fetch()->getAll();
}else{
   
$newsList = News::allSites()->fetch();
}

header('Content-Type: application/json');

echo
json_encode($newsList);


For more information send a message to info at phpclasses dot org.