用api添加记录添加一个空记录

时间:2017-01-03 10:19:56

标签: php

目前我正在通过Versio的API添加记录进行故障排除。我没有看到问题,因为我唯一要做的就是设置创建记录并将其发回的文件的链接。就像这样:



<a href="add.record.php?domain=<?php echo $domain ?>&tld=<?php echo $tld ?>">Record toevoegen</a>
&#13;
&#13;
&#13;

&#13;
&#13;
<?php
require_once("classes/versio.class.php");

$domain = $_GET['domain'];
$tld = $_GET['tld'];

unset($command);
$command = array(
    "command" => "DomainsDNSAddRecord",
    "domain" => $domain,
    "tld" => $tld,
    "name" => "test123.nl",
    "type" => "A",
    "value" => "0.0.0.0",
    "prio" => "10",
    "ttl" => "14400"
);

$api = new Versio_api();
$versio = $api->api_send($command);

if($versio['success']==0) {
    echo("Fout opgetreden. Fout code: ".$versio['command_response_code'].". Fout text: ".$versio['command_response_message']."");
} else {
    header ("location: records.php?domain=$domain&tld=$tld");
}
?>
&#13;
&#13;
&#13;

这会添加包含这些值的记录,但也会添加一个空的记录,这在官方的Versio数据中是看不到的。

0 个答案:

没有答案