Download the PHP package sukohi/shellless without Composer
On this page you can find all versions of the php package sukohi/shellless. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sukohi/shellless
More information about sukohi/shellless
Files in sukohi/shellless
Download sukohi/shellless
More information about sukohi/shellless
Files in sukohi/shellless
Vendor sukohi
Package shellless
Short Description A PHP package to extract readable text from HTML.
License MIT
Package shellless
Short Description A PHP package to extract readable text from HTML.
License MIT
Please rate this library. Is it a good library?
Informations about the package shellless
Shellless
A PHP package to extract readable text from HTML.
Installation
Execute the next command.
composer require sukohi/shellless:1.*
Usage
use Sukohi\Shellless\Shellless;
$html = file_get_contents('http://example.com/');
$shellless = new Shellless();
$result = $shellless->extract($html);
echo $result->title; // Page title
echo $result->best_text; // The longest text
echo $result->full_text; // Joined text if more than 100 characters length.
print_r($result->all_texts, true);
Options
$shellless->setOptions([
'join_step' => 5,
'min_text_length' => 100
]);
Algorithm
- Join close texts if less than 5 HTML tags between them.
- Pick up texts if more than 100 characters length.
License
This package is licensed under the MIT License.
Copyright 2017 Sukohi Kuhoh
All versions of shellless with dependencies
PHP Build Version
Package Version
No informations.
The package sukohi/shellless contains the following files
Loading the files please wait ....