Jump to content

automatically parking domains


Recommended Posts

When someone registers a domain through us, I want to automatically park it until they change the name servers. Similar to what hostgator does. I know how to set up my side of it in whmcs, but how can I automatically add the domain to my account with a parking company? ie. sedo, domainsponsor etc?

 

Are there any that have an api or whmcs module for such a thing?

 

Thanks

Pete.

Link to comment
Share on other sites

  • 1 month later...

Hello,

 

I'm wondering that too. I found following posts that can be relevant:

 

http://forum.whmcs.com/showthread.php?t=7274&highlight=addon+domain+automatically

 

and

 

http://forum.whmcs.com/showthread.php?p=158461#post158461

 

The second one is mine. I hope someone can came up with some solution for this. Maybe we should put it in suggestion area?

 

Cheers.

Link to comment
Share on other sites

This is how I have mine setup and I did it a long time ago but I'll see if I can remember what i did....

 

My site is http://www.computeronlinecenter.com and my parking page for domains is http://www.checkerhost.com | http://www.thesignatureintitiative.com/

 

You will need a dedicated IP (eg. 98.87.00.09), create an accound in WHM and add a parked page on it and then go to the registrar you purchased the domain from and change the dns to point to that IP (@, *, and the www record).

 

I hope I got all in!

Edited by BAJI26
Link to comment
Share on other sites

Try adding a custom hook for:

 

add_hook("PreDomainRegister", 0, "create");

 

 

Do something like this:

 

                  // get the userid (clientid) and check the registration type (Register, Transfer)            
                   $result = mysql_query("SELECT `userid` FROM `tbldomains` WHERE `domain` = '".$domainname."'" AND  `type` <>   'Transfer');

if ($row) {

           $row = mysql_fetch_array($result);

           $clientid = $row['userid'];       
           $domainparking_productid = 17; // "Domain Parking" Product  Id
           $domainname = $vars['domain'];

                             //  WHMCS API create order

                              $postfields["username"] = $username;
                               $postfields["password"] = md5($password);

                               $postfields["action"] = "addorder";
                               $postfields["clientid"] = $clientid;  
                               $postfields["pid"] = $domainparking_productid;            
                               $postfields["domain"] = $domainname;
                               $postfields["billingcycle"] = "Free Account";
                               $postfields["noinvoice"] = "true";
                               $postfields["noemail"] = "true";
                               $postfields["paymentmethod"] = "VISA";

                               $ch = curl_init();
                               curl_setopt($ch, CURLOPT_URL, $url);
                               curl_setopt($ch, CURLOPT_POST, 1);
                               curl_setopt($ch, CURLOPT_TIMEOUT, 100);
                               curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                               curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
                               $data = curl_exec($ch);
                               curl_close($ch);



       // Then active that domain parking
       //  WHMCS API :: Module Create


                               $postfields_modulecreate["username"] = $username;
                               $postfields_modulecreate["password"] = md5($password);

                               $postfields_modulecreate["action"] = "modulecreate";
                               $postfields_modulecreate["accountid"] = $results["productids"];


                               $ch = curl_init();
                               curl_setopt($ch, CURLOPT_URL, $url);
                               curl_setopt($ch, CURLOPT_POST, 1);
                               curl_setopt($ch, CURLOPT_TIMEOUT, 100);
                               curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                               curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields_modulecreate);
                               $data = curl_exec($ch);
                               curl_close($ch);


}

Link to comment
Share on other sites

Instead of making a new account everytime, just point it to your default account. You wouldn't need a dedicated ip either...

 

Set up an account in WHM, and make a index file which will determine the domain name,...

 

Not thought which hook, but one that fires after a successful domain register, call to the cPanel API, create a parked domain. Of course, the domain should be pointed to your NS with that account on...

 

Done... then check it each month for ones no longer in use... I could look into making a module to do exactly this, automatically... Would there be much call for it?

Edited by bdigitalstudios
Wrong word used
Link to comment
Share on other sites

We have a "parked domain" package with very limited cPanel features (i.e. DNS editor, redirects, etc) so when a client signs up for the package, the account get's created on cPanel, but the there's no disk space, emails, databases, etc assigned to it. The client can then either upgrade it to a normal hosting account, or leave it as is and update the DNS A records to point the domain elsewhere.

Link to comment
Share on other sites

This is from a script I have used before it works with cPanel only:

 

CHAPTER 3 - SETTING UP THE DOMAIN PARKING MODULE

 

1. Firstly, you will need to choose a "parking domain". This domain will be used by the system to park each domain on the website. The domain should be a tld (ie: myexample.com). Sub domains, add-ons etc are not supported. For more information about choosing a "parking domain",

2. Once you have chosen your "parking domain", you will need to create an account for it on your server (in cPanel). It is recommended that this domain is given "unlimited" parked domain allowance.

3. Now that you have your "parking domain", you need to change the document root of this domain to point to the "parking" folder on your main account (ie: the url in which the script is installed). This can be done by modifying the"httpd.conf" file on UNIX systems.

4. Once you have changed the document root of your "parking domain", you will need to restart apache so that the new settings take effect.

See what you can do with this as when I get time I will maked a mod/ addon for this.
Link to comment
Share on other sites

  • 1 month later...
When someone registers a domain through us, I want to automatically park it until they change the name servers. Similar to what hostgator does. I know how to set up my side of it in whmcs, but how can I automatically add the domain to my account with a parking company? ie. sedo, domainsponsor etc?

 

Are there any that have an api or whmcs module for such a thing?

 

Thanks

Pete.

 

Hi brother, how would you setup WHMCS to automatically park new registered domains?

 

Thanks.

Link to comment
Share on other sites

This is from a script I have used before it works with cPanel only:

 

See what you can do with this as when I get time I will maked a mod/ addon for this.

 

Do you know why this doesn't work with subdomain?

 

I just parked couple domains over a subdomain, which contains a .php page and it is working correctly but I didn't related with WHMCS yet (about the automatically creation)...

 

You can check, my domain site is http://parked.blymp.com.br and the parked domain: http://www.caikeluna.com.br shows the page hosted at the subdomain.

 

I was wondering how could I setup a package in WHMCS to park a domain on top of my subdomain...

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
Guest
This topic is now closed to further replies.
  • 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