HCCBandwidth A Custom API for Cpanel Version 0.1.1 beta 11/MAY/2005 © 2002,2005 Juan R. Pozo http://html.conclase.net/cp/scripts/ mailto:jrpozo@conclase.net Mailing list: http://www.conclase.net/mailman/listinfo/cpanel_conclase.net License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Note: a copy of the GNU General Public License is available at: http://html.conclase.net/cp/scripts/license.html Installation 1) Check if the file HCCBandwidth.pm exists in your server inside the /usr/local/cpanel/Cpanel/ directory 2) If it exists and isn't a previous version of this API please contact me. Otherwise, follow steps 3 to 8 3) switch to root user 4) # cd /usr/local/cpanel/Cpanel/ 5) # wget –N http://html.conclase.net/cp/scripts/HCCBandwidth.pm 6) # chown root.root HCCBandwidth.pm 7) # chmod 0644 HCCBandwidth.pm 8) Add the following language variables to your language files: // HCCBandwidth (English) HCCBandwidth_Unlimited=Unlimited // HCCBandwidth (Spanish) HCCBandwidth_Unlimited=Sin límite API Reference Displays the maximum monthly data transfer for this account. If no argument is given, the result is displayed in GB. Allowed parameters are: bytes, KB, MB and GB (case-independent). Other values are not valid. The unit name itself is not returned, only the quantity. If there is no limit set, this returns Displays the data transferred by this account during the current month. If no argument is given, the result is displayed in GB. Allowed parameters are: bytes, KB, MB and GB (case-independent). Other values are not valid. The unit name itself is not returned, only the quantity. Displays the available data transfer for this account until its maximum monthly data transfer is reached. If no argument is given, the result is displayed in GB. Allowed parameters are: bytes, KB, MB and GB (case-independent). Other values are not valid. The unit name itself is not returned, only the quantity. If there is no limit set for the maximum monthly data transfer, this returns . Changelog 0.1.1 Beta – 11/MAY/2005 Fixes lang function to account for Cpanel's lang caching method. 0.1 Beta – 22/SEP/2003 Fork from HCCApi 0.3.7. First public release. Restricts valid argument values to bytes, KB, MB, GB (case-independent) and the empty string. Calls only return "Unlimited" if the argument is valid. Please consider making a donation today. Visit my amazon.com wishlist at: http://html.conclase.net/link/wishlist Thank you :)