大家
好,我有一个带有 whmcs 的网站,我想出售我所在县的 tld 为 .al 的域,我已经在网上搜索过这个,但所有人都告诉我,我需要创建一个域注册器模块。
我已经从 whmcs 网站下载了模板,但我不知道如何使用它。有没有人知道如何实现这一点。
<?php
function template_getConfigArray() {
$configarray = array(
"Username" => array( "Type" => "text", "Size" => "20", "Description" => "Enter your username here", ),
"Password" => array( "Type" => "password", "Size" => "20", "Description" => "Enter your password here", ),
"TestMode" => array( "Type" => "yesno", ),
);
return $configarray;
}
function template_GetNameservers($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
# Put your code to get the nameservers here and return the values below
$values["ns1"] = $nameserver1;
$values["ns2"] = $nameserver2;
$values["ns3"] = $nameserver3;
$values["ns4"] = $nameserver4;
# If error, return the error message in the value below
$values["error"] = $error;
return $values;
}
function template_SaveNameservers($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
$nameserver1 = $params["ns1"];
$nameserver2 = $params["ns2"];
$nameserver3 = $params["ns3"];
$nameserver4 = $params["ns4"];
# Put your code to save the nameservers here
# If error, return the error message in the value below
$values["error"] = $error;
return $values;
}
function template_GetRegistrarLock($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
# Put your code to get the lock status here
if ($lock=="1") {
$lockstatus="locked";
} else {
$lockstatus="unlocked";
}
return $lockstatus;
}
function template_SaveRegistrarLock($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
if ($params["lockenabled"]) {
$lockstatus="locked";
} else {
$lockstatus="unlocked";
}
# Put your code to save the registrar lock here
# If error, return the error message in the value below
$values["error"] = $Enom->Values["Err1"];
return $values;
}
这是模块模板中代码的一部分。