Jump to content

please help me to connect api


Recommended Posts

hi i want to connect api to idotz.com i have try, i have follow instruction but when i go confid -> dome registration and i click my module so it show simple page white backgroun and this message

* Registrar Settings

* Other Settings

 

You can configure the settings required to connect to your domain registrar below. Begin by choosing the registrar from the dropdown menu and then you will see the configuration options for that registrar.

please help me out

Link to comment
Share on other sites

this is error Parse error: syntax error, unexpected '}' in /home/skulachi/public_html/billing/modules/registrars/irrp/irrp.php on line 87

and here is irrp.php file please can u solve this problem and thanks for ur help

 

<?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) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# 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) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$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) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# Put your code to get the lock status here

if ($lock=="1") {

$lockstatus="locked";

} else {

$lockstatus="unlocked";

}

return $lockstatus;

}

 

function template_SaveRegistrarLock($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

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;

}

 

function template_GetEmailForwarding($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# Put your code to get email forwarding here - the result should be an array of prefixes and forward to emails (max 10)

foreach ($result AS $value) {

$values[$counter]["prefix"] = $value["prefix"];

$values[$counter]["forwardto"] = $value["forwardto"];

}

return $values;

}

 

function template_SaveEmailForwarding($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

foreach ($params["prefix"] AS $key=>$value) {

$forwardarray[$key]["prefix"] = $params["prefix"][$key];

$forwardarray[$key]["forwardto"] = $params["forwardto"][$key]

}

# Put your code to save email forwarders here

}

 

function template_GetDNS($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# Put your code here to get the current DNS settings - the result should be an array of hostname, record type, and address

$hostrecords = array();

$hostrecords[] = array( "hostname" => "ns1", "type" => "A", "address" => "192.168.0.1", );

$hostrecords[] = array( "hostname" => "ns2", "type" => "A", "address" => "192.168.0.2", );

return $hostrecords;

 

}

 

function template_SaveDNS($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# Loop through the submitted records

foreach ($params["dnsrecords"] AS $key=>$values) {

$hostname = $values["hostname"];

$type = $values["type"];

$address = $values["address"];

# Add your code to update the record here

}

# If error, return the error message in the value below

$values["error"] = $Enom->Values["Err1"];

return $values;

}

 

function template_RegisterDomain($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$domain = $params["domain"];

$ownercontactN = $params["ownercontactN"];

$admincontactN = $params["admincontactN"];

$techcontactN = $params["techcontactN"];

$billingcontactN = $params["billingcontactN"];

$nameserver1 = $params["ns1"];

$nameserver2 = $params["ns2"];

$nameserver3 = $params["ns3"];

$nameserver4 = $params["ns4"];

# Registrant Details

$RegistrantFirstName = $params["firstname"];

$RegistrantLastName = $params["lastname"];

$RegistrantAddress1 = $params["address1"];

$RegistrantAddress2 = $params["address2"];

$RegistrantCity = $params["city"];

$RegistrantStateProvince = $params["state"];

$RegistrantPostalCode = $params["postcode"];

$RegistrantCountry = $params["country"];

$RegistrantEmailAddress = $params["email"];

$RegistrantPhone = $params["phonenumber"];

# Admin Details

$AdminFirstName = $params["adminfirstname"];

$AdminLastName = $params["adminlastname"];

$AdminAddress1 = $params["adminaddress1"];

$AdminAddress2 = $params["adminaddress2"];

$AdminCity = $params["admincity"];

$AdminStateProvince = $params["adminstate"];

$AdminPostalCode = $params["adminpostcode"];

$AdminCountry = $params["admincountry"];

$AdminEmailAddress = $params["adminemail"];

$AdminPhone = $params["adminphonenumber"];

# Put your code to register domain here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_TransferDomain($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$domain = $params["domain"];

$auth = $params["auth"];

$transferlock = $params["transferlock"];

$nameserver1 = $params["ns1"];

$nameserver2 = $params["ns2"];

# Registrant Details

$RegistrantFirstName = $params["firstname"];

$RegistrantLastName = $params["lastname"];

$RegistrantAddress1 = $params["address1"];

$RegistrantAddress2 = $params["address2"];

$RegistrantCity = $params["city"];

$RegistrantStateProvince = $params["state"];

$RegistrantPostalCode = $params["postcode"];

$RegistrantCountry = $params["country"];

$RegistrantEmailAddress = $params["email"];

$RegistrantPhone = $params["phonenumber"];

# Admin Details

$AdminFirstName = $params["adminfirstname"];

$AdminLastName = $params["adminlastname"];

$AdminAddress1 = $params["adminaddress1"];

$AdminAddress2 = $params["adminaddress2"];

$AdminCity = $params["admincity"];

$AdminStateProvince = $params["adminstate"];

$AdminPostalCode = $params["adminpostcode"];

$AdminCountry = $params["admincountry"];

$AdminEmailAddress = $params["adminemail"];

$AdminPhone = $params["adminphonenumber"];

# Put your code to transfer domain here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_RenewDomain($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$domain = $params["domain"];

$period = $params["period"];

# Put your code to renew domain here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_GetContactDetails($params) {

$s_logi = $params["s_logi"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$values["Registrant"]["First Name"] = $firstname;

$values["Registrant"]["Last Name"] = $lastname;

$values["Admin"]["First Name"] = $adminfirstname;

$values["Admin"]["Last Name"] = $adminlastname;

$values["Tech"]["First Name"] = $techfirstname;

$values["Tech"]["Last Name"] = $techlastname;

return $values;

}

 

function template_SaveContactDetails($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# Data is returned as specified in the GetContactDetails() function

$firstname = $params["contactdetails"]["Registrant"]["First Name"];

$middlename = $params["contactdetails"]["Registrant"]["Middle Name"];

$lastname = $params["contactdetails"]["Registrant"]["Last Name"];

$adminfirstname = $params["contactdetails"]["Admin"]["First Name"];

$adminlastname = $params["contactdetails"]["Admin"]["Last Name"];

$techfirstname = $params["contactdetails"]["Tech"]["First Name"];

$techlastname = $params["contactdetails"]["Tech"]["Last Name"];

# Put your code to save new WHOIS data here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_GetEPPCode($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

# Put your code to request the EPP code here - if the API returns it, pass back as below - otherwise return no value and it will assume code is emailed

$values["eppcode"] = $eppcode;

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_RegisterNameserver($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$nameserver = $params["nameserver"];

$ipaddressN = $params["ipaddressN"];

# Put your code to register the nameserver here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_ModifyNameserver($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$nameserver = $params["nameserver"];

$ipaddressN = $params["ipaddressN"];

# Put your code to update the nameserver here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

function template_DeleteNameserver($params) {

$s_login = $params["s_login"];

$s_pw = $params["s_pw"];

$command = $params["command"];

$nameserver = $params["nameserver"];

# Put your code to delete the nameserver here

# If error, return the error message in the value below

$values["error"] = $error;

return $values;

}

 

?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated