Skip to content

avrovulcanxh607/simplenews

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

simplenews

Converts a BBC News Page to an array. You need simple_html_dom to use this, download it here https://simplehtmldom.sourceforge.io/

include "simplenews.php"
$output=getNews("https://www.bbc.co.uk/news/uk-50879809",4)
print_r($output);

The first input is the URL to be downloaded. The second is the max number of paragraphs you want. The function will return an array of the following format:

array(shorttitle,longtitle,description,url,area,inro,paragraphs);

The paragraphs are delivered as another array.