cPanel::PublicAPI::WHM(3pm) - phpMan

Command: man perldoc info search(apropos)  


cPanel::PublicAPI::WHM(3)      User Contributed Perl Documentation      cPanel::PublicAPI::WHM(3)



NAME
       cPanel::PublicAPI::WHM - Legacy interface for querying WHM.

       NOTE: This module is provided for legacy purposes, cPanel::PublicAPI should be used
       instead

DESCRIPTION
       This module provides legacy compatibility support between cPanel::PublicAPI and
       Cpanel::Accounting (distributed with cPanel).  This should never be used unless there is a
       very good reason to use it (such as having a script that uses Cpanel::Accounting).

functions
   "simple_get_whmreq()"
       This function makes a HTTP GET query to WHM, an equivalent function within
       cPanel::PublicAPI is "api_request()".  This function uses two arrays to specify arguments
       to be passed to a specific URI.  This means that you would need to ensure that they both
       have the key/pair values in the same place in each array, f.ex:

         $argref = ['value1', 'value2', 'value3'];
         $argnameref = ['key1', 'key2', 'key3'];

       would be be specifying:

         key1=value1&key2=value2&key3=value3

       to be passed to the specified URI.

       Arguments

       o   $uri - The URI you to be queried.

       o   $argref - An array reference containing the values to be passed.

       o   $argnameref - An array reference containing the keys to be passed.

       o   $opts - An array reference containing strings like 'key1=value1' to be passed to the
           URI.

       This will return a scalar reference of the data returned by cpsrvd.

   "simple_post_whmreq()"
       This function makes a HTTP POST query to WHM, an equivalent function within
       cPanel::PublicAPI is "api_request()".  This function uses two arrays to specify arguments
       to be passed to a specific URI.  This means that you would need to ensure that they both
       have the key/pair values in the same place in each array, f.ex:

         $argref = ['value1', 'value2', 'value3'];
         $argnameref = ['key1', 'key2', 'key3'];

       would be be specifying:

         key1=value1&key2=value2&key3=value3

       to be passed to the specified URI.

       Arguments

       o   $uri - The URI you to be queried.

       o   $argref - An array reference containing the values to be passed.

       o   $argnameref - An array reference containing the keys to be passed.

       o   $opts - An array reference containing strings like 'key1=value1' to be passed to the
           URI.

       This will return a scalar containing the data returned by cpsrvd.

   "whmreq()"
       This function is used to querying WHM with either GET or POST data.

       o   $uri - The URI to be queried.

       o   $method - The method of querying the URI (either GET or POST).

       o   $formdata - The data to be passed to the URI formatted as formdata (e.g.
           'key1=value1&key2=value2').

   "api1()"
       This function is used to query cPanel's API1.  This will return the XML response from the
       XML API's cpanel call.

       o   $user - The user to execute an API call for.

       o   $module - The module of the API call to be executed.

       o   $func - The name of the API call to be executed.

       o   @params - An array containing the parameters for the API call.

   "api2()"
       This function is used to query cPanel's API1.  This will return the XML response from the
       XML API's cpanel call.

       o   $user - The user to execute an API call for.

       o   $module - The module of the API call to be executed.

       o   $func - The name of the API call to be executed.

       o   %params - An hash containing the parameters for the API call.

Bugs
       see http://rt.cpan.org to report and view bugs

License
       Copyright (c) 2011, cPanel, Inc.  All rights reserved.  http://cpanel.net

       Redistribution and use in source and binary forms, with or without modification, are
       permitted provided that the following conditions are met:
            * Redistributions of source code must retain the above copyright
              notice, this list of conditions and the following disclaimer.
            * Redistributions in binary form must reproduce the above copyright
              notice, this list of conditions and the following disclaimer in the
              documentation and/or other materials provided with the distribution.
            * Neither the name of cPanel, Inc. nor the
              names of its contributors may be used to endorse or promote products
              derived from this software without specific prior written permission.

       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
       MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL  BE
       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
       (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
       DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
       IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
       DAMAGE.



perl v5.10.1                                2011-03-04                  cPanel::PublicAPI::WHM(3)

Generated by $Id: phpMan.php,v 4.55 2007/09/05 04:42:51 chedong Exp $ Author: Che Dong
On Apache
Under GNU General Public License
2024-04-25 03:11 @3.141.202.54 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0!Valid CSS!