Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subdomain creation using php #22

Open
zubairudin opened this issue Aug 25, 2015 · 1 comment
Open

Subdomain creation using php #22

zubairudin opened this issue Aug 25, 2015 · 1 comment

Comments

@zubairudin
Copy link

Hello, this is what i want.

I have two domains in godadday hosting

firstdomain

seconddomain

I have this code running in firstdomain but i wanna create sub-domain for second domain using following code.

$cpanelusr = 'username';
$cpanelpass = 'password';
$xmlapi = new xmlapi('seconddomain.com');
$xmlapi->set_port( 2083 );
$xmlapi->password_auth($cpanelusr,$cpanelpass);
$xmlapi->set_debug(1); //output actions in the error log 1 for true and 0 false
$result
= $xmlapi->api2_query($cpanelusr, 'SubDomain', 'addsubdomain',
array("$subdomain_name",'seconddomain.com',0,0,
'/public_html/project3/user'));

I am getting this error "curl_exec threw error "couldn't connect to host".............."

@tvaughan73
Copy link
Contributor

Is this server using NAT? You can tell by going to the control panel and looking at the sever info. If the local IP is a private IP then it is using NAT. If godaddy doesn't have NAT hairpinning set up properly then you will not be able to issue requests that go to the same server.
Even if the local IP is not a private IP it is still probably a NAT issue with the server and you should contact godaddy about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants