Saturday, 1 September 2018

Boxbilling Licence.php

Go to /bb-library/Box/License.php and edit

<?php
/**
 * BoxBilling
 *
 * @copyright BoxBilling, Inc (http://www.boxbilling.com)
 * @license   Apache-2.0
 *
 * Copyright BoxBilling, Inc
 * This source file is subject to the Apache-2.0 License that is bundled
 * with this source code in the file LICENSE
 */


class Box_License implements \Box\InjectionAwareInterface
{
    protected $di;

    public function setDi($di)
    {
        $this->di = $di;
    }

    public function getDi()
    {
        return $this->di;
    }

    /**
     * @return string
     */
    public function getKey()
    {
        return true;
    }

    public function check()
    {
        return ture;
    }

    public function isValid()
    {
        return true;
    }

    public function isPro()
    {
        return true;
    }

    private function getBBType()
    {
        return true;
    }

    public function getDetails($from_server = false)
    {
        return $data;
    }

    public function _getLicenseDetailsFromServer(array $servers)
    {
        $params = array();
        $params['license']  = $this->di['config']['license'];
        $params['host']     = BB_URL;
        $params['path']     = BB_PATH_ROOT;
        $params['version']  = \Box_Version::VERSION;
        $params['os']       = PHP_OS;
        $params['format']   = 2;

        return array();
    }

    private function _tryLicensingServer($url, $params)
    {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_VERBOSE, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
        curl_setopt($ch, CURLOPT_TIMEOUT, 20);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
        $result = curl_exec($ch);

        curl_close($ch);
        return $result;
    }
}

No comments:

Post a Comment