當前位置: 首頁>>代碼示例>>PHP>>正文


PHP openSRS_base類代碼示例

本文整理匯總了PHP中openSRS_base的典型用法代碼示例。如果您正苦於以下問題:PHP openSRS_base類的具體用法?PHP openSRS_base怎麽用?PHP openSRS_base使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了openSRS_base類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: opensrs_TransferSync

function opensrs_TransferSync($params)
{
    $regusername = $params['Username'];
    $regpassword = $params['Password'];
    $regprivatekey = $params['PrivateKey'];
    if ($params['TestMode']) {
        $mode = "test";
        $protocol = "XCP";
    } else {
        $mode = "live";
        $protocol = "XCP";
    }
    $server_ip = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];
    require_once dirname(__FILE__) . "/openSRS_base.php";
    $domainid = $params['domainid'];
    $domain = $params['domain'];
    $username = opensrs_getusername($domain);
    $password = opensrs_getpassword($domainid, $domain);
    $O = new openSRS_base($mode, $protocol, $regusername, $regprivatekey);
    $opensrscookie = "";
    $error = "";
    $cmd = array("object" => "COOKIE", "action" => "SET", "registrant_ip" => $server_ip, "attributes" => array("domain" => $domain, "reg_username" => $username, "reg_password" => $password));
    $result = $O->send_cmd($cmd);
    logModuleCall("opensrssync", "Get Domain Info", $cmd, $result, "", array($username, $password));
    if ($result['is_success'] != "1") {
        return array("error" => $result['response_text']);
    }
    $opensrscookie = $result['attributes']['cookie'];
    $expirydate = $result['attributes']['expiredate'];
    $expirydate = explode(" ", $expirydate);
    $expirydate = $expirydate[0];
    $rtn = array();
    $rtn['active'] = true;
    $rtn['expirydate'] = $expirydate;
    return $rtn;
}
開發者ID:billyprice1,項目名稱:whmcs,代碼行數:36,代碼來源:opensrs.php

示例2: __construct

 public function __construct($formatString, $dataObject)
 {
     parent::__construct($dataObject);
     $this->_dataObject = $dataObject;
     $this->_process();
 }
開發者ID:carriercomm,項目名稱:WHMCS-OpenSRSPro-Module,代碼行數:6,代碼來源:opensrspro.php

示例3: __destruct

 public function __destruct()
 {
     parent::__destruct();
 }
開發者ID:Ryan-Nolan,項目名稱:boxbilling,代碼行數:4,代碼來源:cookieSet.php


注:本文中的openSRS_base類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。