sokolnikov911/yandex-xml

PHP Yandex.XML search API client

1.0.2 2022-04-29 14:53 UTC

This package is auto-updated.

Last update: 2024-10-29 05:47:29 UTC


README

Russian version of README you can find here: README_RU.md.

PHP Yandex.XML search API client

Examples

$yandexXmlUser = 'xmluser';
$yandexXmlKey = '12.12344:123443543534';

$client = new Client($yandexXmlUser, $yandexXmlKey);

$result = $client
    ->query('search query')
    ->page(2)
    ->l10n(Client::L10N_UKRAINIAN)
    ->get();

Installing

Install composer. Follow instructions on download page: https://getcomposer.org/download/

Next, run the Composer command to install the latest stable version of yandex-xml

php composer.phar require sokolnikov911/yandex-xml

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

You can then later update yandex-xml using composer:

composer.phar update

Requirements

This client requires at least PHP7.3 (yeahh, type hinting!) and Guzzle 7.

License

This library has licensed under the MIT License.