PHP code example of modalnetworks / metasearch-drivers

1. Go to this page and download the library: Download modalnetworks/metasearch-drivers 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/ */

    

modalnetworks / metasearch-drivers example snippets


composer 

use Modalnetworks\MetaSearch\Drivers\AbcdDriver;
use Modalnetworks\MetaSearch\MetaSearchService;

$str = 'string file generate';

$settings = new \Modalnetworks\MetaSearch\MetaSearchMappingConfig($mapping['mappings']['abcd']);
$settings->setExtrasMerge(['client_id' => 'token client']);
$driver = (new AbcdDriver($settings, true));


try{
    (new MetaSearchService)->driver($driver)->pushRemote($str, function ($response) {
        dump($response);
    });

}catch(\Exception $e){
   dump($e->getMessage());
}