Zubrag.com
January 16, 2018, 07:32:55 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: PHP subdomain creator  (Read 7130 times)
xoox
Newbie
*
Posts: 2


« on: November 09, 2006, 12:39:40 PM »

I downloaded the script for creating a subdomain using PHP from here. Ihor had mailed me about how to modify it..The transcript of the mail is here..

You should not remove any "define" statements from the code.
You have to set values there.

Usually you will need to update only following code and leave
everything else unchanged.

// cpanel user
define('CPANELUSER','put-your-cpanel-user-here');

// cpanel password
define('CPANELPASS','put-your-cpanel-password-here');

I have not been able to get it..Basically the code says that if I run the php code in browser, it shud work..but i am not able to ge tit..
i tried running the direct URL passing too...still not able to get it..pls help..

Logged
zubrag
Administrator
Hero Member
*****
Posts: 785


WWW
« Reply #1 on: November 09, 2006, 04:00:06 PM »

Please try changing data in the following url (bold things only), then paste it in your browser, and check if it created subdomain.

http://user:password@host:2082/frontend/skin/subdomain/doadddomain.html?domain=subdomain&rootdomain=domain

  • user - cpanel username, the one you use to login to cpanel account
  • password - cpanel password, the one you use to login into cpanel account
  • host - cpanel host name, usually localhost, but you may contact your hosting provider to know for sure
  • skin - cpanel skin (theme). Usually x, but yours may be different. Read this article to know what it cpanel skin on your server: how to determine your cpanel skin name
  • subdomain - sub-domain to create. Do not add http://www
  • domain - subdomain will be created on this domain. Do not add http://www

Sample (will not work for you, just an example with fictitious data):
http://xoox:WeB001@localhost:2082/frontend/x/subdomain/doadddomain.html?domain=mysubd&rootdomain=mysite.com

Please let us know if it worked.
Logged
xoox
Newbie
*
Posts: 2


« Reply #2 on: November 11, 2006, 03:44:46 PM »

Thanks a lot zubrag..
Now, I had to make two changes apart from the usual ones you had said..

1. localhost did not work, I had to use my domain name xyz.com for host.

2. x was not my cpanel skin. I had to replace it with rvorange.

Hope people who try and are unsuccessful make use of this info to debug.

Btw, the final page lands inside my cpanel. So, I guess I should use a redirect.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC