Skip to content

Servers::changeDnsPtr

Danny Li edited this page Apr 2, 2018 · 3 revisions

Change the hostname that will appear when getting the hostname belonging to the primary IPs (ipv4 and ipv6) of this server.

Floating IPs assigned to the server are not affected by this

Parameters

Parameter Type Description
$id int Server ID
$ip string A single IPV4 or IPV6 address
$dns_ptr null/string Hostname to set as a reverse DNS PTR entry, will reset to original default value if null

Returns

Action object

Example

<?php
use Exploriment\HetznerCloud;

$action = HetznerCloud\Servers::changeDnsPtr(1, '127.0.0.1', 'my.hostname.ext');

echo $action->getStatus();
Clone this wiki locally