PHP code example of kveldscholten / kasapi-php

1. Go to this page and download the library: Download kveldscholten/kasapi-php 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/ */

    

kveldscholten / kasapi-php example snippets


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

$kasConfiguration = new KasApi\KasConfiguration("w0123456", "password", "plain");

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

$kasApi->get_databases();

protected $functions = [
  [...]
  'get_dns_settings'        => 'zone_host!, record_id',
  'get_domains'             => 'domain_name',
  'get_topleveldomains'     => '',
  'get_ftpusers'            => 'ftp_login',
  'get_mailaccounts'        => 'mail_login',
  [...]
];

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



namespace KasApi;

foreach (glob("src/KasApi/*.php") as $filename) {
    ain");
  $kasApi = new KasApi($kasConfiguration);

  $kasData = $kasApi->get_domains(); // any API function as described above
} catch(KasApiException $e) {
  echo $e->getFaultstring(); // show SOAP error
}

var_dump($kasData); // $kasData is a plain old PHP array


 composer