// readme

Hostinger API PHP SDK

About

This is a PHP SDK for the Hostinger API. For more information, please visit https://developers.hostinger.com.

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the package via Composer, run the following command:

composer require hostinger/api-php-sdk

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure Bearer authorization: apiToken
$config = Hostinger\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Hostinger\Api\AgencyHostingCacheApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    client: new GuzzleHttp\Client(),
    config: $config
);
$websiteUid = zpwlGlp19; // string | Agency…