Hostinger API PHP SDK
https://developers.hostinger.com β HEALTH ? 82 / Healthy
Hostinger API PHP SDK
https://developers.hostinger.com β// readme
This is a PHP SDK for the Hostinger API. For more information, please visit https://developers.hostinger.com.
PHP 8.1 and later.
To install the package via Composer, run the following command:
composer require hostinger/api-php-sdk
Download the files and include autoload.php:
<?php
require_once('/path/to/vendor/autoload.php');
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β¦