API Documentation

All of our services are also available via a REST-API for developers to automate your infrastructure administration.

Sample Code

The following code demonstrates how to connect to the ILLYHOSTING API from a PHP script using CURL.

<?php
/**
 * IllyHosting API - Sample Call (PHP Curl)
 * @author     ILLYSOFT LLC 
 * @copyright  Copyright (c) ILLYSOFT LLC 2006-2020
 * @version    V1
 * @link       https://illyhosting.com
 */

//API Endpoint 
$apiurl = "https://api.illyhosting.com/"; //API ENDPOINT URL with Trailing Slash 

//Your API credentials generated in our control panel
$api_identifier = "your_api_credential_identifier";
$api_secret = "your_api_credential_secret";

//Post values
$postfields = array(
    'api_identifier' => $api_identifier,
    'api_secret' => $api_secret,
    'service' => 'VPS',
    'action' => 'Create',
);

//Call the API 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
$response = curl_exec($ch);
if (curl_error($ch)) {
    die('Unable to connect: ' . curl_errno($ch) . ' - ' . curl_error($ch));
}
curl_close($ch);

// Decode response
$jsonData = json_decode($response, true);

// Dump array structure
var_dump($jsonData);
?>