Search by

humanik / aparser-client

humanik

There is no license information available for the latest version (1.0.0) of this package.

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Package info

github.com/humanik/aparser-api-php-client

pkg:composer/humanik/aparser-client

Statistics

Installs: 421

Dependents: 0

Suggesters: 0

Stars: 0

1.0.0 2021-11-23 12:15 UTC

This package is auto-updated.

Last update: 2026-01-05 00:49:40 UTC


README

This client assists in making calls to A-Parser API.

Requirements

  • PHP version >= 7.4;
  • curl function enabled.

Usage

<?php

$aparser = new Humanik\Aparser\Client('http://127.0.0.1:9091/API', 'pass');

//List of supported requests
$aparser->ping();
$aparser->info();
$aparser->oneRequest('compact keyboard', 'SE::Google', 'default');
$aparser->bulkRequest(['compact keyboard', 'usb compact keyboard'], 'SE::Google');
$aparser->getParserPreset('SE::Google', 'default');
$aparser->getProxies();
$aparser->changeProxyCheckerState('default', true);

# 1 way
$aparser->addTask('default', 'default', 'text', ['keyboard', 'usb keyboard']);

# 2 way. Advanced
$options = [
    'parsers' => [
        [
            'SE::Google::Position',
            'default'
        ]
    ],
    'resultsFormat'   => '$p1.domain:$p1.key:$p1.position\n',
];
$id = $aparser->addTask('default', '', 'text', ['msn.com microsoft'], $options);

$aparser->getTaskConf($id);
$aparser->getTaskState($id);
$aparser->changeTaskStatus($id, 'deleting');

License

Released under the MIT License.