Matthew Dees > cPanel-PublicAPI > cPanel::PublicAPI::WHM

Download:
cPanel-PublicAPI-1.002.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  0
View/Report Bugs
Module Version: 1   Source  

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

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

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.

api1()

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

api2()

This function is used to query cPanel's API1. This will return the XML response from the XML API's cpanel 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.

syntax highlighting: