pribolshoy/parseroid

dev-main 2024-05-12 21:13 UTC

This package is not auto-updated.

Last update: 2024-05-16 15:51:43 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>
?>