Plesk

Domain

To retrieve information about a domain, use the
pm_Domain
class.

The
pm_Domain
class represents a domain hosted in Plesk. This class supports
retrieving information about a domain by its ID.

Retrieving domain information

To retrieve the various data about a domain, use these methods:

Also, there following static methods can be used for retrieving domains:

You can also use the
pm_View_Helper_DomainOverviewUrl
class to help you build the URL to the Domain Overview page.

Storing and Retrieving Domain-specific Data

It is possible to store and retrieve arbitrary data for a specific
domain. The following methods add new data records, retrieve existing
data and remove records that are no longer needed:

Note: These serve as a key-value storage for a specific
domain.

Examples

To retrieve the name and creation date of a domain, use the following
code:

$domain = new pm_Domain($domainId);
echo "Domain name: {$domain->getName()}";
echo "Created at {$domain->getProperty('cr_date')}";