santanamic / php-scraping
dev-master / 1.0.x-dev
2019-03-08 16:32 UTC
Requires
- php: ~7.1
Requires (Dev)
- phpunit/phpunit: >=7.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-11-09 14:04:10 UTC
README
Web scraping in PHP is a class of data collection used to extract data from websites.
Structure
src/
tests/
Install
Via Composer
$ composer require santanmic/php-scraping
Usage
require_once __DIR__ . '/../vendor/autoload.php'; $url = 'https://yugioh.fandom.com/pt-br/wiki/Categoria:Cards_de_Monstro?from=Ansatsu'; $PHPscraping = (new PHPScraping\Factory)->create($url); echo $PHPscraping->getDescription(); // return <meta name="description"> content echo $PHPscraping->getKeywords(); // return <meta name="Keywords"> content echo $PHPscraping->getTitle(); // return web site title echo $PHPscraping->getLinkNext(); // return next indicating paginated content <link rel="next" href="page_3> echo $PHPscraping->getLinkPrev(); // return prev indicating paginated content <link rel="prev" href="page_1>
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.