PHP Class for All-Inkl KAS API

All-Inkl.com is a Webhoster in Germany, which provides an API for automated access to your data, such as account settings, (sub-)domains, databases, cronjobs, mail accounts, and so on. This API is called the KAS API. To learn more about it, visit the official KAS API Documentation. This Project provides a PHP Class for All-Inkl KAS API requests; it encapsulates the available KAS API SOAP requests in a way easy to use .

Download and Installation

The Project is available at GitHub. The recommended installation method is to use composer, as the project is available at Packagist. Just add the following line to the “require” section of your composer.json

Alternatively you can clone the following GIT repository (git clone https://github.com/wazaari/kasapi-php.git).

Usage

To make API requests, you first need to create a KasConfiguration object:

Username is quite self explaining. The KAS API allows for different types of authentication. Thus, you need to specify an authentication type and the corresponding authentication data, which could be a hashed password. Have a look at the documentation of all-incl to obtain a list of possible authentication methods. As an example, assume you want to use “sha1” as authentication method. In this case, kas_auth_type simply would be “sha1”, and kas_auth_data should be set to the sha1 hash of your KAS account password:

This method allows you to authenticate against the KAS API without storing your plain password in a configuration file or database. Next, you need to create an KasApi object to operate on:

On this object, you can call any API method specified in the KAS documentation. Alternatively, you can have a look at the KasApi class.

Examples from the KasApi class might look like this:

This array specifies which API functions you may call and which parameters to pass. The ! suffix means that this parameter is required and has to be specified (e.g. zone_host!), all other parameters are optional (e.g. nameserver).

If you have any feedback, please provide it as comment or issue using GitHub.

Credits

This work is based on previous work by Elias Kuiter (https://github.com/ekuiter/kasapi-php).

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.