Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2008
    Location
    /root/webhosting
    Posts
    884

    Customized Billing Panel - Need Assistance

    Hi,
    We are planning to develop the billing panel which will be combination of WHMCS and ResellersClub.

    I would like to know the functionality of WHMCS in following aspects:
    • Calender wise sending email to client before XX days of due date. (Payment remonder)
    • Working of CRON file of automation which includes sending payment reminders and everything that takes place.
    • WHMCS cpanel modules which creates/suspends/change password of cpanel account through whmcs.
    • Suspension of cpanel account if payment not made after XX days of due date.
    • How WHMCS do conversation with server(Opens a connection between cpanel/whm based server with user and key)
    • RC domain registration

    Need Assistance
    ██ Website Hosting Mumbai | Web Hosting India
    ██ Web Hosting Unleashed
    ██ cPanel-Softaculous Shared Hosting | 99.9% Uptime
    ██ sales[at]linkwayhosting.com | +91-9930-3388-67

  2. #2
    So you're developing some software, and want us to do the work for you? How much are you paying?

    Have you contacted WHMCS for assistance?

  3. #3
    Join Date
    Apr 2011
    Location
    United States
    Posts
    23
    Search up cPCreator or THT and read the source code for those to see how you are able to open a connection to WHM, good luck with your project though.

  4. #4
    Join Date
    Oct 2008
    Location
    /root/webhosting
    Posts
    884
    Search up cPCreator or THT and read the source code for those to see how you are able to open a connection to WHM, good luck with your project though.
    Thanks I will check, but how about WHMCS ? I have used THT only couple of times
    Sorry for late reply
    ██ Website Hosting Mumbai | Web Hosting India
    ██ Web Hosting Unleashed
    ██ cPanel-Softaculous Shared Hosting | 99.9% Uptime
    ██ sales[at]linkwayhosting.com | +91-9930-3388-67

  5. #5
    Join Date
    Apr 2011
    Location
    United States
    Posts
    23
    Skim through the code of this little code snippet, it was released by cPanel

    PHP Code:
    <?php
    # cpanel4 - Accounting.php.inc              Copyright(c) 1999-2002 John N. Koston
    #                                 All rights Reserved.
    [email protected]              http://cpanel.net         

    # This file is governed by the cPanel license


    global $cpanelaccterr;


    function 
    suspend ($host,$user,$accesshash,$usessl,$suspenduser) {
        
    $result whmreq("/scripts/remote_suspend?user=${suspenduser}",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }
        return 
    $result;
    }
    function 
    unsuspend ($host,$user,$accesshash,$usessl,$suspenduser) {
        
    $result whmreq("/scripts/remote_unsuspend?user=${suspenduser}",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }
        return 
    $result;
    }
    function 
    killacct ($host,$user,$accesshash,$usessl,$killuser) {
        
    $result whmreq("/scripts/killacct?user=${killuser}&nohtml=1",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }
        return 
    $result;
    }
    function 
    showversion ($host,$user,$accesshash,$usessl) {
        
    $result whmreq("/scripts2/showversion",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }
        return 
    $result;
    }
    function 
    createacct ($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan) {
        
    $result whmreq("/scripts/wwwacct?remote=1&nohtml=1&username=${acctuser}&password=${acctpass}&domain=${acctdomain}&plan=${acctplan}",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }
        return 
    $result;
    }

    function 
    listaccts ($host,$user,$accesshash,$usessl) {
        
    $result whmreq("/scripts2/listaccts?nohtml=1&viewall=1",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }

            
    $page split("\n",$result);
        foreach (
    $page as $line) {
            list(
    $acct,$contents) = split("="$line);
            if (
    $acct != "") {
                
    $allc split(","$contents);
                
    $accts[$acct] = $allc;
            }
            }
            return(
    $accts);
    }
    function 
    listpkgs ($host,$user,$accesshash,$usessl) {
        
    $result whmreq("/scripts/remote_listpkg",$host,$user,$accesshash,$usessl);
        if (
    $cpanelaccterr != "") { return; }


            
    $page split("\n",$result);
        foreach (
    $page as $line) {
            list(
    $pkg,$contents) = split("="$line);
            if (
    $pkg != "") {
                
    $allc split(","$contents);
                
    $pkgs[$pkg] = $allc;
            }
            }
            return(
    $pkgs);
    }
    function 
    whmreq ($request,$host,$user,$accesshash,$usessl) {


        
    $cleanaccesshash preg_replace("'(\r|\n)'","",$accesshash);
            
    $authstr $user ":" $cleanaccesshash;
        
    $cpanelaccterr "";


        if (
    function_exists("curl_init")) {
            
    $ch curl_init();
            if (
    $usessl) {
                
    curl_setopt($chCURLOPT_SSL_VERIFYPEER,0);                
                
    curl_setopt($chCURLOPT_SSL_VERIFYHOST,0);
                
    curl_setopt($chCURLOPT_URL"https://${host}:2087" $request);
            } else {
                
    curl_setopt($chCURLOPT_URL"http://${host}:2086" $request);
                    }
            
    curl_setopt($chCURLOPT_HEADER0);
            
    curl_setopt($chCURLOPT_RETURNTRANSFER,1);
                
    $curlheaders[0] = "Authorization: WHM $authstr";
                    
    curl_setopt($ch,CURLOPT_HTTPHEADER,$curlheaders);
            
    $data=curl_exec ($ch);
            
    curl_close ($ch);
        } elseif (
    function_exists("socket_create")) {
            if (
    $usessl) {
                
    $cpanelaccterr "SSL Support requires curl";
                return;
            }
            
    $service_port 2086;
            
    $address gethostbyname($host);
            
    $socket socket_create (AF_INETSOCK_STREAM0);
            if (
    $socket 0) {
                    
    $cpanelaccterr "socket_create() failed";
                return;
            }
            
    $result socket_connect ($socket$address$service_port);
            if (
    $result 0) {
                    
    $cpanelaccterr "socket_connect() failed";
                return;
            }
            
    $in "GET $request HTTP/1.0\n";
            
    socket_write($socket,$in,strlen($in));    
            
    $in "Connection: close\n";
            
    socket_write($socket,$in,strlen($in));    
            
    $in "Authorization: WHM $authstr\n\n\n";
            
    socket_write($socket,$in,strlen($in));    
        
            
    $inheader 1;
            while((
    $buf socket_read($socket512)) != false) {
              if (!
    $inheader) {
                  
    $data .= $buf;
                  }
              if(
    preg_match("'\r\n\r\n$'s"$buf)) {
                
    $inheader 0;
              }
              if(
    preg_match("'\n\n$'s"$buf)) {
                
    $inheader 0;
              }
              if(
    preg_match("'\r\n$'s"$buf)) {
                
    $inheader 0;
              }
            }

        } else {
            
    $cpanelaccterr "php not compiled with --enable-sockets OR curl";
            return;
        }

        return 
    $data;    
    }

    ?>

  6. #6
    Join Date
    Oct 2008
    Location
    /root/webhosting
    Posts
    884
    Thanks cmaniac
    But where did you find this ? On cpanel's website ?
    ██ Website Hosting Mumbai | Web Hosting India
    ██ Web Hosting Unleashed
    ██ cPanel-Softaculous Shared Hosting | 99.9% Uptime
    ██ sales[at]linkwayhosting.com | +91-9930-3388-67

  7. #7
    Join Date
    Oct 2003
    Location
    Scotland, UK
    Posts
    2,900
    That cPanel code looks very old and out of date. Not even sure if cPanel still support it, the API's are how to do things these days:

    http://docs.cpanel.net/twiki/bin/vie...entKit/WebHome

    If you are looking at developing competing software... you should know all of this already
    Alasdair

  8. #8
    Join Date
    Apr 2008
    Location
    United States, MI
    Posts
    766
    That code snippet is useless. The XML-RPC doesn't function that way anymore.
    Steven Crothers
    No BS cloud engineer and Red Hat architect.

Similar Threads

  1. Can I transfer mails from Plesk to cpanel or customized panel or vice versa.
    By slyshooter in forum Hosting Software and Control Panels
    Replies: 3
    Last Post: 08-24-2009, 06:04 PM
  2. HSphere control panel assistance
    By computist2007 in forum Employment / Job Offers
    Replies: 5
    Last Post: 02-25-2008, 03:04 PM
  3. Any billing panel/control panel addon that can intregrate into the control panel?
    By Oskare100 in forum Hosting Software and Control Panels
    Replies: 8
    Last Post: 04-06-2007, 12:20 AM
  4. A fully customized control panel -- WHY NOT?
    By SsZERO in forum Employment / Job Offers
    Replies: 1
    Last Post: 04-21-2003, 04:51 PM
  5. Customized RaQ3 Control Panel
    By koolguru in forum Dedicated Server
    Replies: 1
    Last Post: 03-29-2001, 02:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •