codefarm / grabber
customizable package to grab data from webpage using php
v1.0.0
2022-01-09 07:25 UTC
Requires
- php: >=7.0
Requires (Dev)
- orchestra/testbench: ^6.23
This package is auto-updated.
Last update: 2025-04-16 04:06:40 UTC
README
This customizable package can extract data from website and html files using php. Here's how you can use it:
Installation
You can install the package via composer:
composer require codefarm/grabber
Usage
Here are a few short examples of what you can do:
$parser = new HtmlParser($path_to_html_file); $parser->getData();
It can also a string html:
$parser = new HtmlParser($string_html); $parser->getData();
Or you can even add even custom pattern:
use codefarm\Grabber\Facade\Grabber; Grabber::fields([ CustomPattern::class ]); $parser = new HtmlParser($string_html); $parser->getData();
Testing
composer test
License
The MIT License (MIT).