PHP code example of hipex / pack-api
1. Go to this page and download the library: Download hipex/pack-api 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/ */
hipex / pack-api example snippets
$client = new \HipexPackApi\Client();
$client->login('[email protected]', 'password');
$servers = $client->queryServer();
foreach ($servers as $server) {
$filter = new \HipexPackApi\Generated\Schema\Input\FilterInput();
$filter->setField('server.id');
$filter->value($server->getId());
$domains = $client->queryDomain($filter);
}
$query = '
query Server {
Server {
id
name
domains {
id
domain
letsEncryptSsl
backup
}
}
}
';
$serversAndDomains = $client->raw($query);