Skip to content

Back the fun of reading - PHP Port for Arc90′s Readability

License

Notifications You must be signed in to change notification settings

mingcheng/php-readability

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Readability Library

If you want to use an up-to-date version of this algorithm,check this newer project:

https://github.com/andreskrey/readability.php

Back the fun of reading

The PHP port of Readability.js by Arc90.

Requirements

Live demo

http://graceco.de/readability/

Usage

require 'lib/Readability.inc.php';

$Readability     = new Readability($html, $html_input_charset); // default charset is utf-8
$ReadabilityData = $Readability->getContent(); // throws an exception when no suitable content is found

// You can see more params by var_dump($ReadabilityData);
echo "<h1>".$ReadabilityData['title']."</h1>";
echo $ReadabilityData['content'];

PS: For Node.js port, You can check this.

About

Back the fun of reading - PHP Port for Arc90′s Readability

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •