pribolshoy/parseroid

Public library

Maintainers

Package info

github.com/Pribolshoy/parseroid

pkg:composer/pribolshoy/parseroid

Transparency log

Statistics

Installs: 30

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0-alpha.3 2026-08-29 20:57 UTC

This package is not auto-updated.

Last update: 2026-08-31 14:15:45 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.

HTTP proxies (Curl)

Optional list of proxies via env PARSEROID_PROXIES. On each request Curl picks one at random.

# JSON array
PARSEROID_PROXIES='["http://user:pass@1.2.3.4:8080","socks5://5.6.7.8:1080"]'

# or comma-separated (host:port → http://)
PARSEROID_PROXIES=1.2.3.4:8080,http://5.6.7.8:3128

Empty / unset — direct connection. Last used proxy: Curl::getLastProxy(). Programmatic override: ProxyConfig::setProxies([...]).

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>
?>