• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

XML API - CREATE SUBDOMAINS (urgent)

K

kruc3fix

Guest
Hi, this is my first post on this forum.

I've searched the forum and nothing came close for an answer so here's my post.

PLESK 7.5 RELOADED ON FEDORA CORE 2.
I'm trying to create a subdomain using the xml-rpc api for php. The manual states that I should use the script below. What it does is creating a domain for a particular client.

The examples provided by the manual shows how to create/modify a domain, mail, mailman, client, ip , event etc, but it says nothing about subdomains. First I thought subdomains are seen as domains and there is a filter where you can chose the domain id, meaning it will create a subdomain. But there is nothing that does this.

What I want to do is something basic - a user registers using a form and get's a free subdomain (a wordpress package will be copied in his subdomain, so he doesn't have access to ftp, db, mail).

CAN YOU PLEASE HELP WITH THIS !! My deadline is tomorrow and I've searched for an answer all week. My last hope is within this forum. Thanx in advance.


// define some constants

$proto = PROTO_VER;
$data =<<<EOF
<packet version="$proto">
<domain>
<add>
<gen_setup>
<name>sub.dom.com</name>
<client_id>67</client_id>
<status>0</status>
<ip_address>209.97.211.153</ip_address>
</gen_setup>
<hosting>
<vrt_hst>
<ftp_login>kkk</ftp_login>
<ftp_password>xxxxxx</ftp_password>
<ftp_quota>0</ftp_quota>
<fp>false</fp>
<fp_ssl>false</fp_ssl>
<fp_auth>false</fp_auth>
<fp_admin_login>miaumiaul</fp_admin_login>
<fp_admin_password>lalalalallaa</fp_admin_password>
<ssl>false</ssl>
<shell>/bin/false</shell>
<php>true</php>
<ssi>false</ssi>
<cgi>false</cgi>
<mod_perl>false</mod_perl>
<mod_python>false</mod_python>
<asp>false</asp>
<asp_dot_net>false</asp_dot_net>
<coldfusion>false</coldfusion>
<webstat>none</webstat>
<errdocs>false</errdocs>
<at_domains>true</at_domains>
</vrt_hst>
</hosting>
</add>
</domain>
</packet>
EOF;

// execute curl engine and sendCommand()
 
I know you can create a subdomain with a cgi script using
./subdomain.sh --create "forum" -domain "domain.zone"
, but I can't start learning cgi right now. I think there is a way to do the exact thing using the xml-rpc api.

So, anyone??? Aren't there people that offer webhosting (with subdomains) using plesk?

thanx.
 
*BUMP*

Will we ever be able to manage subdomains with the Plesk API?

I've seen the 'virtdir' operator in protocol version 1.4.1.1 even takes a subdomain-id as input, but without a way to get this info using the Plesk API ... :confused:
 
Back
Top