KissNode Posted January 10, 2014 Share Posted January 10, 2014 Hi, I currently provide game servers via TCAdmin which is linked with my WHMCS billing system. I also have CPanel linked to WHMCS. I would like to make it so that whenever a client orders a game server, they also have an option to put in the name for their website on the sub domain of my website. For example xxx.site.mywebsite.com . I would then like this site to automatically be created. Since I have CPanel linked, this should be possible. Any ideas? Thanks! 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 10, 2014 Share Posted January 10, 2014 (edited) Hi Yes, it's possible. You need to create a custom field or a configurable option where clients insert subdomains ("awesomeclan.example.com" - field name: "subdomain") then with the action hook AfterModuleCreate you retreive the value from $vars["customfields"]["subdomain"] (or $vars["configoptions"]["subdomains"]), remove everything after the first dot so that you have "awesomeclan", create a new DNS zone on example.com for "awesomeclan" in some way (depends on what Registrar you are using and how you "speak" with nameservers), create an hosting package on cPanel with the standard API of cPanel and set a new Mail Template to send a welcome email with FTP credentials and so on. Notice that you will also need the opposite function. When an user no longer is your customer you will run some actions with AfterModuleTerminate hook point to terminate the hosting account on cPanel and remove the DNS zone from your domain. Possible problems: You should consider to add a sort of blacklist system to prevent your clients from reserving particular subdomains like forum.example.com or blog.example.com... it could be very dangerous If you don't want to play with DNS zones you could just create a wildcard A record to example.com so that you can freely create subdomains on the fly with a simple .htaccess file. Edited January 10, 2014 by Kian 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted January 11, 2014 Share Posted January 11, 2014 There is a thing you should check for registering subdomains in WHMCS. Search forum threads... 0 Quote Link to comment Share on other sites More sharing options...
KissNode Posted January 17, 2014 Author Share Posted January 17, 2014 There is a thing you should check for registering subdomains in WHMCS. Search forum threads... What are you talking about buddy? This thread has little to do with registering sub-domains, and more to do with getting an account automatically created on a sub-domain and cPanel account off my main domain. 0 Quote Link to comment Share on other sites More sharing options...
KissNode Posted January 20, 2014 Author Share Posted January 20, 2014 Someone please help! 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted January 20, 2014 Share Posted January 20, 2014 Search Forum http://forum.whmcs.com/search.php?searchid=1417738 0 Quote Link to comment Share on other sites More sharing options...
KissNode Posted January 20, 2014 Author Share Posted January 20, 2014 Search Forum http://forum.whmcs.com/search.php?searchid=1417738 Tried to click that link and it said Sorry - no matches. Please try some different terms. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted January 20, 2014 Share Posted January 20, 2014 http://forum.whmcs.com/search.php Type "subdomains" 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.