PHP code example of humanik / aparser-client

1. Go to this page and download the library: Download humanik/aparser-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

humanik / aparser-client example snippets




$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');