ASP

This section contains examples of using the integration API that are written in ASP language.

To add a host to Plesk Sitebuilder hosts pool, the following steps should be taken:

1.   Specify common Sitebuilder preferences.

The preferences are as follows:

 

dim baseUrl, adminLogin, adminPassword, newAccountId, newSiteId
dim error

baseUrl="http://localhost:2006"
adminLogin="admin"
adminPassword="admin"

 

2.   Specify the ID of a site owner account and the site name. A sample of the properties can look as follows:

 

HostName ="My new host"
HostAddress ="192.0.2.12"

 

3. Add code of function CreateHost from the list of core functions. These functions are written on ASP and are used to invoke Plesk Sitebuilder integration API methods.

For list of core functions, click the following link: functions list.

4.   Run the CreateHost function.

NewHostID = CreateHost(HostName, HostAddress)

 

If the host is successfully added, the host ID value will be written to the NewHostID variable.

For full ASP code sample, click on the following link: code sample.