ASP

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

To create a Plesk Sitebuilder site, the following steps should be taken:

1.   Specify common Plesk 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:

 

SiteOwnerID ="a12b50410-da11-vf8e-m6c4-3f0cb537a9a3"
SiteName ="My Site"

 

3. Add code of function CreateSite 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 CreateSite function.

NewSiteID = CreateSite(SiteOwnerID, SiteName)

 

If the site is successfully created, the site ID value will be written to the NewSiteID variable.

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