hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : whmcs registrar code issues.
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

whmcs registrar code issues.

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-05-2012, 03:52 PM
hostsleek hostsleek is offline
Junior Guru Wannabe
 
Join Date: May 2011
Location: W-Africa
Posts: 73
Arrow

whmcs registrar code issues.


It wont just register domain... Can anyone check this code and see whats wrong.. I would be grateful.


<?php

function ng_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 ng_RegisterDomain($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
$regperiod = $params["regperiod"];
$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

################# This is were i start to define my own code ####################
// Define constants
define("API_KEY_ID", "My API KEY ID");
define("API_SECRET_KEY", "My API Secret Key");
define("API_URL", "http://www.myapiurl.com.ng/api.php");
define("API_VERSION", "0000000");
// Build query arguments list
$params = array(
'action' => 'createDomain',
'version' => API_VERSION,
'keyId' => API_KEY_ID,
'name' => $sld.".".$tld,
'period' => $regperiod,
'ns' => array($nameserver1, $nameserver2, $nameserve3, $nameserver4),
///// What other agrguments should i list here.
);
// Sorg arguments
ksort($params);

// Generate string for sign
$string2sign = "";
foreach ($params as $k => $v) {
$string2sign .= "{$k}{$v}";
}

// Generate signature
$params['signature'] = base64_encode(hash_hmac('sha1', $string2sign, API_SECRET_KEY, 1));

// Build query
$query = http_build_query($params);

// Execute query
$c = file_get_contents(API_URL."?{$query}");

####################################################

# If error, return the error message in the value below
$values["error"] = $error;
return $values;
}

?>

__________________
HostSleek
Web Hosting and Domain Name Registration

Reply With Quote


Sponsored Links
  #2  
Old 08-06-2012, 02:32 AM
MikeDVB MikeDVB is offline
Web Host Extraordinaire!!!
 
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,316
You may want to use the [php] or [code] tags, fyi.

__________________
Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
For high-end shared accounts ideal for business, check out our Semi-Dedicated offerings!
http://www.mddhosting.com/ - Providing Quality Services since 2007

Reply With Quote
  #3  
Old 08-06-2012, 03:37 AM
hostsleek hostsleek is offline
Junior Guru Wannabe
 
Join Date: May 2011
Location: W-Africa
Posts: 73
@MikeDVB ..
How do I so that..
I would be glad if u can put me 2tru.

Thx

__________________
HostSleek
Web Hosting and Domain Name Registration

Reply With Quote
Sponsored Links
  #4  
Old 08-06-2012, 04:29 AM
MikeDVB MikeDVB is offline
Web Host Extraordinaire!!!
 
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,316
I am referring to your post here on WHT...
PHP Code:
<?php
echo('This is inside of the vBulletin PHP tags');
?>
Code:
And this is inside of the vBulletin 'CODE' tags.
It just makes it easier to copy/paste/read.

__________________
Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
For high-end shared accounts ideal for business, check out our Semi-Dedicated offerings!
http://www.mddhosting.com/ - Providing Quality Services since 2007

Reply With Quote
  #5  
Old 08-07-2012, 12:55 PM
hostsleek hostsleek is offline
Junior Guru Wannabe
 
Join Date: May 2011
Location: W-Africa
Posts: 73
@MikeDVB.

Thx for your assistance.. I an still having issues with the custom registrar.
Can I PM u. For more assistant.

Regards.

__________________
HostSleek
Web Hosting and Domain Name Registration

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Registrar issues with WHMCS, Opensrs, ResellerClub quantmweb Reseller Hosting 9 08-19-2012 05:28 PM
DNS issues with my registrar! Okoji Domain Names 8 02-03-2011 12:21 PM
Country Code Domain Registrar Losvre Domain Names 11 06-02-2010 09:53 AM
Registrar won't give Auth Code tech-pro Domain Names 25 06-29-2007 06:08 PM
Registrar not giving code for transfer 2Grumpy Running a Web Hosting Business 16 02-27-2004 01:37 AM

Related posts from TheWhir.com
Title Type Date Posted
WHMCS Integrates eNom New TLD Portal Web Hosting News 2013-04-04 16:44:38
WHMCS Releases Version 5.2 of Web Hosting Billing Solution Web Hosting News 2013-04-14 22:35:37
Web Host Billing System WHMCS Deals with Support Challenges, Network Issues Web Hosting News 2012-09-14 10:36:58
Host The Best Beefs Up WHMCS Integration With WHMCS Experts Acquisition Web Hosting News 2012-02-21 12:11:17
SSL Certificate Distributor The SSL Store Adds WHMCS Integration Web Hosting News 2011-06-30 16:49:59


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?