大家好
我有一个网站与whmcs,我想出售与我的县的tld的域名,这是.al,我已经搜索了网络,但都告诉我,我需要创建一个域名注册模块。
我已经从whmcs网站下载了模板,但我不知道如何使用it.Does,任何人都有任何想法,我可以做到这一点。
<?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;
}这是模块模板中的代码的一部分。
发布于 2013-06-14 23:45:59
那么,第一步将是确定您将使用哪个注册商来注册您的域。有相当多的模块已经预先构建并包含在WHMCS中。您可以看到列表here。
如果您使用的注册商在WHMCS中还没有预先构建的模块,那么您需要创建自己的模块。您下载的模板具有WHMCS中支持的所有功能。然而,在你推出你自己的模块之前,你需要看看你的注册商是否有API。如果他们不这样做,那么为WHMCS构建模块就没有意义了。如果有,请通读他们的文档。一旦你熟悉了注册器的功能,就只需要把你下载的WHMCS模板和注册器的API连接起来。
祝你好运!
https://stackoverflow.com/questions/16983284
复制相似问题