santanamic/php-scraping

dev-master / 1.0.x-dev 2019-03-08 16:32 UTC

This package is auto-updated.

Last update: 2024-11-09 14:04:10 UTC


README

Latest Version on Packagist Software License PHP Version Coverage Status Build Status Total Downloads

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.