API::ISPManager - interface to the ISPManager Hosting Panel API ( http://ispsystem.com )
use API::ISPManager; my $connection_params = { username => 'username', password => 'qwerty', host => '11.22.33.44', path => 'manager', }; ### Get all panel IP my $ip_list = API::ISPManager::ip::list( $connection_params ); unless ($ip_list && ref $ip_list eq 'ARRAY' && scalar @$ip_list) { die 'Cannot get ip list from ISP'; } my $ip = $ip_list->[0]; my $dname = 'perlaround.ru'; my $client_creation_result = API::ISPManager::user::create( { %{ $connection_params }, name => 'user_login', passwd => 'user_password', ip => '11.11.22.33', preset => 'template_name', domain => $dname, }); # Switch off account: my $suspend_result = API::ISPManager::user::disable( { %{ $connection_params }, elid => $use_login, } ); unless ( $suspend_result ) { die "Cannot suspend account"; } # Switch on account my $resume_result = API::ISPManager::user::enable( { %{ $connection_params }, elid => $user_login, } ); unless ( $resume_result ) { die "Cannot suspend account"; } # Delete account my $delete_result = API::ISPManager::user::delete( { %{ $connection_params }, elid => $login, } ); unless ( $delete_result ) { die "Cannot delete account"; }
To install API::ISPManager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm API::ISPManager
CPAN shell
perl -MCPAN -e shell install API::ISPManager
For more information on module installation, please visit the detailed CPAN module installation guide.