Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

This is an example written in PHP allowing users to manage DNS Manager clients, DNS Zones and DNS Records. Download.

This demonstrative code SHOULD NOT be used in production. It is designed to show how a client application can interact with the DNS Manager SystemAPI. From this perspective, validations and error-checks aiming to demonstrate the most common mistakes are minimal and can be done easily.

How To Install It

System Requirements

In order to be able to use the SystemAPI PHP example, your system must be compliant with the requirements below:

  • Your system needs to have PHP 5.1.2 or any subsequent version installed.
  • PHP must be compiled using the --enable-soap configuration option.
  • The SystemAPI PHP example requires the PHP extension libxml - Version 2.5.4 or any subsequent version.

Setup

  1. Download the archive, extract the files and copy them to a directory that can be accessed over the Web.
  2. In order to use the tool, you must configure it. To do so, you must open the file config.php in the <PATH_TO_SYSTEMAPI_PHP_TOOL>/config.php and change the following settings:
  • Set the $dnsmanager_ip variable to the IP or hostname of your DNS Manager server.
  • Set the $dnsmanager_username to the username of the DNS Manager account you want to use.
  • Set the $dnsmanager_password to the password of the DNS Manager account you want to use.
  • Set the $dnsmanager_port to the port of the DNS Manager server.
  • Set the $dnsmanager_version to the version of the DNS Manager schema files.
  • Set the $request_typeto the request type you want to make:
    • If you want to add a client account, you must set the variable $request_type = "client"
    • If you want to add a DNS Zone, you must set the variable $request_type = "dnszone" and also set the $client_id to the ID of the client that owns the DNS Zone.
    • In order to add a DNS Record, you must set the variable $request_type = "dnsrecord". It is also required that you set the $dnszone_name to the name of the DNS Zone that will contain the DNS Record.

How To Use It

To access the interface, simply visit https://<IP>/<PATH_TO_SYSTEMAPI_TOOL>/index.php.
Please note that you can't access the application unless you set it up before. Otherwise, you will get a warning message with the issues you need to fix, just as shown below:

  • If Current PHP version > 5.1.2 setup is not validated, you should check your PHP installation.
  • If PHP is configured with --enable-soap setup is not validated, you should make sure the PHP is compiled using the --enable-soap option.
  • If DNSManager SystemAPI is reachable setup is not validated, then you should check the configuration file and make sure you have correctly set the server or connection parameters.

Once the configuration process is complete, you can access the interface and use it to add clients, DNS Zones and DNS Records.

Adding a Client

Using this section of the application you can add client accounts to DNS Manager. The following information can be set using the form:

Parameter

Required

Description

Company

No

The company name of the user

Contact name

Yes

The contact name of the user

Login

Yes

Username for the new account

Password

Yes

Password for the new account

Phone

No

Phone number of the new account

Fax

No

Fax number of the new account

Email

Yes

Email of the new account

Address

No

Address of the new account

City

No

City for the new account

Postal/ZIP code

No

Postal/ZIP code for the new account

Country

Yes

Select a country from the list of countries

State/Province

No

Select a state or province

Notes

No

More notes about the account

Adding a DNS Zone

By using this section of the application, you can add DNS Zones to the DNS Manager server. The following information can be set using the form:

Parameter

Description

DNS Zone Name

The name of the DNS Zone

DNS Zone Type

The type of the DNS Zone. Can be either master, or slave.

  • You can set the $template_id parameter in the configuration file to create the DNS Zone from a template
  • You can set the $template_ip parameter in the configuration file to add a template IP for the DNS Zone

Adding a DNS Record

By using this section of the application, you can add DNS Records to the DNS Manager server. The following information can be set using the form:

Parameter

Description

DNS Record Name

The type of the DNS Record

Host

The host

Value

The value of the record.

Primary

Check if you have a primary record.

Further Reading

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.