Default Subdomain creation using php

Hello, this is what i want.

I have two domains in godadday hosting



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

[php] $cpanelusr = ‘username’;
$cpanelpass = ‘password’;
$xmlapi = new xmlapi(‘’);
$xmlapi->set_port( 2083 );
$xmlapi->set_debug(1); //output actions in the error log 1 for true and 0 false
= $xmlapi->api2_query($cpanelusr, ‘SubDomain’, ‘addsubdomain’,

I am getting this error “curl_exec threw error “couldn’t connect to host”…”

Port 2083 would be the SSL port. You sure you didnt mean to use 2082 there?

@StarLion i used port 2083 because godaddy using https to access cpanel but i tried port 2082 after your reply. It’s still not working.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.