pribolshoy / parseroid
Public library
dev-main
2024-06-26 11:52 UTC
Requires
- php: >=7.4
- phpstan/phpstan: ^1.10
Requires (Dev)
- phpunit/phpunit: ^9.5.10
- squizlabs/php_codesniffer: ^3.9
- vlucas/phpdotenv: *
This package is not auto-updated.
Last update: 2025-03-05 15:05:58 UTC
README
Package for parsing different types of resources (html pages, xml etc.).
This package is not ready solution for all resource types.
It just giving you necessary abstract functional for constructing you own needs. But in a way that makes it easy for you to do.
Simple example:
<?php
require_once "vendor/autoload.php";
$handler = (new \pribolshoy\parseroid\factories\HandlerFactory())
->create('html_page_handler', [
'parser_name' => 'google_parser',
'resource' => 'https://www.google.com/search?q=php+it%27s+amazing',
]);
$result = $handler->getItem();
print_r($result);
//<pre>Array
//(
// [0] => Array
// (
// [input_text] => php it's amazing
// )
//
//)
//</pre>
?>