1 package Net::Plesk::Method::domain_add;
5 use vars qw( $VERSION @ISA $AUTOLOAD $DEBUG );
7 @ISA = qw( Net::Plesk::Method );
14 Net::Plesk::Method::domain_add - Perl extension for Plesk XML Remote API domain addition
18 use Net::Plesk::Method::domain_add
20 my $p = new Net::Plesk::Method::domain_add ( $clientID, 'domain.com' );
22 $request = $p->endcode;
26 This module implements an interface to construct a request for a domain
27 addition using SWSOFT's Plesk.
35 Initializes a Plesk domain_add object. The I<domain>, I<client>, and
36 $<ip_address> options are required.
41 my ($self, $domain, $client, $ip, $template, $user, $pass) = @_;
42 my $xml = join ( "\n", (
47 $self->encode($domain),
50 $self->encode($client),
53 $xml .= '<htype>vrt_hst</htype>' if defined($user);
54 $xml .= join ( "\n", ( '<ip_address>',
60 $xml .= "<hosting><vrt_hst><ftp_login>" . $self->encode($user);
61 $xml .= "</ftp_login><ftp_password>" . $self->encode($pass);
62 $xml .= "</ftp_password><ip_address>" . $self->encode($ip);
63 $xml .= "</ip_address></vrt_hst></hosting>";
66 $xml .= "<template-name>" . $self->encode($template) . "</template-name>";
68 $xml .= '</add></domain>';
81 SWSOFT Plesk Remote API documentation (1.4.0.0 or later)
85 Jeff Finucane E<lt>jeff@cmh.netE<gt>
87 =head1 COPYRIGHT AND LICENSE
89 Copyright (C) 2006 Jeff Finucane
91 This library is free software; you can redistribute it and/or modify
92 it under the same terms as Perl itself.