2017 © Pedro Peláez
 

library kasapi-php

Manage your All-Inkl account with the KAS API for PHP

image

wazaari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  • Saturday, June 23, 2018
  • by waza-ari
  • Repository
  • 3 Watchers
  • 8 Stars
  • 282 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 2 Open issues
  • 8 Versions
  • 7 % Grown

The README.md

kasapi-php

Manage your All-Inkl account with the KAS API for PHP

All-Inkl.com provides an API for automated access to all your accounts, settings, (sub-)domains, databases, cronjobs, mail accounts, ... This API is called the KAS API. To learn more about it, visit the official KAS API Documentation. There are also some example forms to try out., (*1)

This is a PHP implementation of the API, which provides simple access to all functions provided by the API., (*2)

Installation

The recommended installation method is to use Composer. This software is available at Packagist., (*3)

Just add the following line to the require section of your composer.json:, (*4)

 "wazaari/kasapi-php": "dev-master"

Alternatively you can clone the following Git repository (git clone https://github.com/waza-ari/kasapi-php.git, see below)., (*5)

Usage

Now, we will take a closer look at how this API works., (*6)

Whenever you want to use the API, you need to create a KasConfiguration object first. This is done easily:, (*7)

$kasConfiguration = new KasApi\KasConfiguration($username, $authData, $authType);

$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-Inkl to obtain a list of possible authentication methods., (*8)

As an example, assume you want to use sha1 as authentication method. In this case, $authType simply would be sha1, and $authData should be set to the sha1 hash of your KAS account. Assuming your username is abcd1234 and your password is password, the following line would create the correct credential object:, (*9)

$kasConfiguration = new KasApi\KasConfiguration("abcd1234", sha1("password"), "sha1");

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:, (*10)

$kasApi = new KasApi\KasApi($kasConfiguration);

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

$kasApi->get_databases();

Examples from the KasApi class might look like this:, (*12)

private $functions = array(
  [...]
  'get_dns_settings'        => 'zone_host!, nameserver, record_id',
  'get_domains'             => 'domain_name',
  'get_topleveldomains'     => '',
  'get_ftpusers'            => 'ftp_login',
  'get_mailaccounts'        => 'mail_login',
  [...]
);

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. domain_name)., (*13)

So if you look at get_dns_settings above, you see that a call like, (*14)

$kasApi->get_dns_settings(array(
  'zone_host' => 'example.com.',
  'record_id' => 123
));

is perfectly valid. Notice we omitted the nameserver parameter, which is optional, but we included the zone_host, which is required in every case., (*15)

Usage without Composer

Here's an example of how to use the API if you just git clone this repository: (Place this file in the parent directory of the src directory.), (*16)

get_domains(); // any API function as described above
  var_dump($kasData); // $kasData is a plain old PHP array
} catch(KasApiException $e) {
  echo $e->getMessage(); // show message on SOAP error
}

?>

If you have any feedback, please provide it as comment or issue using GitHub and the URL above., (*17)

Changelog

Version 0.5

  • Starting from version 0.5, this project is now released under the MIT license. A copy can also be found in this repository. Further, the former GPL license has been removed.

Version 0.4

  • Minor fix to prevent a Warning while fetching parameters from arguments

Version 0.3

Credits

Elias Kuiter created kasapi-php to provide an easy way to access All-Inkl's public API. Credits go to Daniel Herrmann as well for making big extensions to the API (such as streamlining the classes, correcting some errors and adding Composer integration). Note that the original repository (ekuiter/kasapi-php) is now deprecated, use this repository instead., (*18)

The Versions

23/06 2018

dev-master

9999999-dev https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

MIT

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

23/06 2018

v0.5.3

0.5.3.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

MIT

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

16/07 2016

v0.5.2

0.5.2.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

MIT

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

15/05 2015

0.5.1

0.5.1.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

MIT

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

07/05 2015

v0.51

0.51.0.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

MIT

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

27/02 2015

v0.5

0.5.0.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

MIT

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

30/12 2014

v0.4

0.4.0.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

GPLv3

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas

03/12 2014

v0.3

0.3.0.0 https://github.com/waza-ari/kasapi-php

Manage your All-Inkl account with the KAS API for PHP

  Sources   Download

GPLv3

by Daniel Herrmann
by Elias Kuiter

api php wsdl all-inkl kas