• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP XML_RPC_Client类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中XML_RPC_Client的典型用法代码示例。如果您正苦于以下问题:PHP XML_RPC_Client类的具体用法?PHP XML_RPC_Client怎么用?PHP XML_RPC_Client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了XML_RPC_Client类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: sendRPC

 /**
  * @access private
  * @static
  */
 function sendRPC($method, $params = array())
 {
     global $mwBlockerHost, $mwBlockerPort, $mwBlockerDebug;
     $client = new XML_RPC_Client('/Blocker', $mwBlockerHost, $mwBlockerPort);
     if ($mwBlockerDebug) {
         $client->debug = true;
     }
     $rpcParams = array_map(array('MWBlocker', 'outParam'), $params);
     $message = new XML_RPC_Message($method, $rpcParams);
     wfSuppressWarnings();
     $start = wfTime();
     $result = $client->send($message);
     $delta = wfTime() - $start;
     wfRestoreWarnings();
     $debug = sprintf("MWBlocker::sendRPC for %s took %0.2fms\n", $method, $delta * 1000.0);
     wfDebug($debug);
     if ($mwBlockerDebug) {
         echo $debug;
     }
     if (!is_object($result)) {
         throw new MWException("Unknown XML-RPC error");
     } elseif ($result->faultCode()) {
         throw new MWException($result->faultCode() . ': ' . $result->faultString());
     } else {
         $value = $result->value();
         return $value->getval();
     }
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:32,代码来源:MWBlocker.php


示例2: onLoad

 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->isPostBack) {
         $deviceId = $this->Request["deviceId"];
         $cmd = $this->db->createCommand("SELECT * FROM `hr_horux_media` WHERE id_device=:id");
         $cmd->bindParameter(":id", $deviceId, PDO::PARAM_STR);
         $row = $cmd->query();
         $row = $row->read();
         require_once 'XML/RPC.php';
         $client = new XML_RPC_Client("RPC2", $row["ip"], $row["port"]);
         $msg = new XML_RPC_Message("horuxInfoDisplay.getMediaList");
         @($response = $client->send($msg));
         if ($response) {
             if (!$response->faultCode()) {
                 $v = $response->value();
                 $result = explode(",", html_entity_decode($v->scalarval()));
                 $media = array();
                 foreach ($result as $k => $v) {
                     $media[] = array("Value" => $v, "Text" => $v);
                 }
                 $this->media->DataTextField = 'Text';
                 $this->media->DataValueField = 'Value';
                 $this->media->DataSource = $media;
                 $this->media->dataBind();
                 if (count($media) > 0) {
                     $this->media->setSelectedIndex(0);
                 }
             } else {
                 $content_error = "ERROR - ";
                 $content_error .= "Code: " . $response->faultCode() . " Reason '" . $response->faultString() . "'<br/>";
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:35,代码来源:addMedia.php


示例3: format

 /**
  * function that takes an address object and gets the latitude / longitude for this
  * address. Note that at a later stage, we could make this function also clean up
  * the address into a more valid format
  *
  * @param object $address
  *
  * @return boolean true if we modified the address, false otherwise
  * @static
  */
 function format(&$values)
 {
     require_once 'CRM/Utils/Address.php';
     // we need a valid zipcode, state and country, else we ignore
     if (!CRM_Utils_Array::value('postal_code', $values) && !CRM_Utils_Array::value('state_province', $values) && !CRM_Utils_Array::value('country', $values)) {
         return false;
     }
     if ($values['country'] != 'United States') {
         return false;
     }
     $string = CRM_Utils_Address::format($values);
     $string = str_replace("\n", ', ', $string);
     if (!$string) {
         return false;
     }
     $params = array(new XML_RPC_Value($string, 'string'));
     $message = new XML_RPC_Message('geocode', $params);
     $client = new XML_RPC_Client($GLOBALS['_CRM_UTILS_GEOCODE_RPC']['_uri'], $GLOBALS['_CRM_UTILS_GEOCODE_RPC']['_server']);
     $response = $client->send($message);
     if (!$response && !$response->faultCode()) {
         return false;
     }
     $data = XML_RPC_decode($response->value());
     if (!CRM_Utils_Array::value(0, $data)) {
         return false;
     }
     $data = $data[0];
     $values['geo_code_1'] = $data['lat'];
     $values['geo_code_2'] = $data['long'];
     return true;
 }
开发者ID:bhirsch,项目名称:voipdrupal-4.7-1.0,代码行数:41,代码来源:RPC.php


示例4: getFromOrigin

/**
 * This is the core XML-RPC client it takes the parameters passed in and bundles them up
 * and sends them as an XML-RPC request to the origin server, which processes them against
 * the central database and passes the results back to this client
 *
 * @param string $function  The name of the remote origin function to be called
 * @param array  $params    An array of the parameters to be passed to the origin function
 * @return mixed            The decoded response from the origin server
 */
function getFromOrigin($function, $params)
{
    /**
     * @package    MaxDal
     * @subpackage Delivery
     * @author     Chris Nutting <[email protected]>
     *
     */
    $conf = $GLOBALS['_MAX']['CONF'];
    // Create an XML-RPC client to talk to the XML-RPC server
    $client = new XML_RPC_Client($conf['origin']['script'], $conf['origin']['host'], $conf['origin']['port']);
    $message = new XML_RPC_Message($function, array());
    // Add the parameters to the message
    $message->addParam(new XML_RPC_Value($params, $GLOBALS['XML_RPC_String']));
    // Send the XML-RPC message to the server
    $response = $client->send($message, $conf['origin']['timeout'], $conf['origin']['protocol']);
    if (!$response || $response->faultCode() != 0) {
        if (defined('OA_DELIVERY_CACHE_FUNCTION_ERROR')) {
            return OA_DELIVERY_CACHE_FUNCTION_ERROR;
        } else {
            return null;
        }
    } else {
        // Decode the serialized response
        $value = $response->value();
        $value = $value->scalarval();
        $value = unserialize($value);
    }
    return $value;
}
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:39,代码来源:xmlrpc.php


示例5: drawMachines

function drawMachines()
{
    $cli = new XML_RPC_Client('/RPCSERVER', $_SESSION["host"], $_SESSION["port"]);
    $req = new XML_RPC_Value(array("sut_username" => new XML_RPC_Value($_SESSION['username'], 'string')), "struct");
    $msg = new XML_RPC_Message('listMachines', array($req));
    $resp = $cli->send($msg);
    if (hasErrors($resp)) {
        return;
    }
    $machines = $resp->value();
    $i = $machines->arraysize();
    while ($i--) {
        $m = XML_RPC_decode($machines->arraymem($i));
        echo "<form name='{$m}' action='set_config.php?SUT_MACHINE={$m}' method='post'>\n        <ul class='menu' >\n        <li >\n        <p  onclick='javascript:toggleSpan(\"span{$m}\");' >{$m}<br/><span id='span{$m}'>{$m}\n        <a href='javascript:;' onclick='addEvent(\"span{$m}\", \"sName{$m}\", \"sValue{$m}\");'><em class='butt'>Add</em></a>\n        <input type='submit' value='Save'><br style='clear:both'>\n        <a href='setup_machine.php?machine={$m}'><em class='butt'>Setup</em></a>\n        <a href='start_manager.php?machine={$m}'><input type='button' value='StartManager'></a><br>\n\n        <input id='sName{$m}'  type='text' value='SUT_NAME' style='clear:both; float:left; width:25%;'/>\n        <input id='sValue{$m}' type='text' value='Value'/><br>";
        $params = new XML_RPC_Value(array("sut_username" => new XML_RPC_Value($_SESSION['username'], 'string'), "sut_machine" => new XML_RPC_Value($m, 'string')), "struct");
        $msg = new XML_RPC_Message('getConfig', array($params));
        $resp = $cli->send($msg);
        if (hasErrors($resp)) {
            return;
        }
        $cfgTable = $resp->value();
        $j = $cfgTable->arraysize();
        while ($j--) {
            $cfgEntry = $cfgTable->arraymem($j);
            $cfgEntry->structreset();
            $symbol = XML_RPC_decode($cfgEntry->structmem("symbol"));
            $value = XML_RPC_decode($cfgEntry->structmem("val"));
            echo "<b>{$symbol}</b>";
            echo "<input type='text' name='{$symbol}' value='{$value}' /><br>\n";
        }
        echo " </span></p>\n            </li> </ul> </form>";
    }
}
开发者ID:BackupTheBerlios,项目名称:bee-svn,代码行数:33,代码来源:machines.php


示例6: grabTracWikiPageHTML

 /**
  * Method to get a specific wiki page in HTML
  *
  * @param string $pagename
  * @return string HTML
  */
 public function grabTracWikiPageHTML($pagename)
 {
     $msg = new XML_RPC_Message('wiki.getPageHTML', array(new XML_RPC_Value($pagename, "string")));
     $cli = new XML_RPC_Client($this->tracURL, $this->tracServ);
     $cli->setDebug(0);
     // send the request message
     $resp = $cli->send($msg);
     if (!$resp) {
         throw new customException($this->objLanguage->languageText("mod_filters_commserr", "filters") . ": " . $cli->errstr);
         exit;
     }
     if (!$resp->faultCode()) {
         $val = $resp->value();
         $val = XML_RPC_decode($val);
         if (is_array($val)) {
             return $val['faultString'];
         } else {
             return $val;
         }
     } else {
         /*
          * Display problems that have been gracefully caught and
          * reported by the xmlrpc server class.
          */
         throw new customException($this->objLanguage->languageText("mod_filters_faultcode", "filters") . ": " . $resp->faultCode() . $this->objLanguage->languageText("mod_filters_faultreason", "filters") . ": " . $resp->faultString());
     }
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:33,代码来源:tracrpcclient_class_inc.php


示例7: fullGraph

 /**
  * Method to get a specific wiki page in HTML
  *
  * @param string $pagename
  * @return string HTML
  */
 public function fullGraph()
 {
     $msg = new XML_RPC_Message('dlGraphFull');
     $pserv = $this->objSysConfig->getValue('package_server', 'packages');
     $purl = $this->objSysConfig->getValue('package_url', 'packages');
     $cli = new XML_RPC_Client($purl, $pserv);
     $cli->setDebug(0);
     // send the request message
     $resp = $cli->send($msg);
     if (!$resp) {
         throw new customException($this->objLanguage->languageText("mod_filters_commserr", "filters") . ": " . $cli->errstr);
         exit;
     }
     if (!$resp->faultCode()) {
         $val = $resp->value();
         $val = XML_RPC_decode($val);
         if (is_array($val)) {
             return $val['faultString'];
         } else {
             return $val;
         }
     } else {
         /*
          * Display problems that have been gracefully caught and
          * reported by the xmlrpc server class.
          */
         throw new customException($this->objLanguage->languageText("mod_filters_faultcode", "filters") . ": " . $resp->faultCode() . $this->objLanguage->languageText("mod_filters_faultreason", "filters") . ": " . $resp->faultString());
     }
 }
开发者ID:ookwudili,项目名称:chisimba,代码行数:35,代码来源:poprpcclient_class_inc.php


示例8: onReloadDisplay

 public function onReloadDisplay($sender, $param)
 {
     require_once 'XML/RPC.php';
     $client = new XML_RPC_Client("RPC2", "localhost", 7000);
     $msg = new XML_RPC_Message("horuxInfoDisplay.reload");
     @($response = $client->send($msg));
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:7,代码来源:mediaList.php


示例9: drawMachines

function drawMachines()
{
    $cli = new XML_RPC_Client('/RPCSERVER', 'localhost', 5000);
    $msg = new XML_RPC_Message('listMachines');
    $resp = $cli->send($msg);
    if (hasErrors($resp)) {
        return;
    }
    $machines = $resp->value();
    $i = $machines->arraysize();
    #$i = 1;
    while ($i--) {
        $m = XML_RPC_decode($machines->arraymem($i));
        echo "<form name='{$m}' action='set_config.php?SUT_MACHINE={$m}' method='post'> <ul id='menu'>\n        <li ><p>{$m}\n        <span id='span{$m}'>\n        <a href='javascript:;' onclick='addEvent(\"span{$m}\", \"sName{$m}\", \"sValue{$m}\");'><em class='butt'>Add</em></a>\n        <input type='submit' value='Save'>\n\n        <input id='sName{$m}'  type='text' value='SUT_NAME' style='text-align:right; clear:both; float:left; width:12em;'/>\n        <input id='sValue{$m}' type='text' value='Value'/>\n\n\n        ";
        $params = array(new XML_RPC_Value($m, 'string'));
        $msg = new XML_RPC_Message('getConfig', $params);
        $resp = $cli->send($msg);
        if (hasErrors($resp)) {
            return;
        }
        $cfgTable = $resp->value();
        $j = $cfgTable->arraysize();
        while ($j--) {
            $cfgEntry = $cfgTable->arraymem($j);
            $cfgEntry->structreset();
            $symbol = XML_RPC_decode($cfgEntry->structmem("symbol"));
            $value = XML_RPC_decode($cfgEntry->structmem("val"));
            echo "<b>{$symbol}</b>";
            echo "<input type='text' name='{$symbol}' value='{$value}' /><br>\n";
        }
        echo "\n\n        </span></p>\n            </li>\n            </ul>\n\n</form>";
    }
}
开发者ID:BackupTheBerlios,项目名称:bee-svn,代码行数:33,代码来源:base_lib.php


示例10: createPublisher

 function createPublisher($sessionId, $publisherName)
 {
     // Add new Publisher
     $oPublisher = new XML_RPC_VALUE(array('agencyid' => new XML_RPC_Value(1, 'int'), 'publisherName' => new XML_RPC_Value($publisherName, 'string'), 'contactName' => new XML_RPC_Value('Ian', 'string'), 'emailAddress' => new XML_RPC_Value('[email protected]', 'string'), 'username' => new XML_RPC_Value('rishad', 'string'), 'password' => new XML_RPC_Value('rishad', 'string')), 'struct');
     $aParams1 = array(new XML_RPC_Value($sessionId, 'string'), $oPublisher);
     $oMessage1 = new XML_RPC_Message('addPublisher', $aParams1);
     $oClient1 = new XML_RPC_Client($this->publisherRpcWebServiceUrl, $this->xmlRpcHost);
     $oResponse1 = $oClient1->send($oMessage1);
     $publisherID = $this->returnXmlRpcResponseData($oResponse1);
     echo 'Publisher' . $publisherID . '<br>';
     return $publisherID;
 }
开发者ID:rayku,项目名称:rayku,代码行数:12,代码来源:xml.php


示例11: get_firmware_version

function get_firmware_version($return_php = true)
{
    global $g;
    $versioncheck_base_url = "www.pfsense.com";
    $versioncheck_path = "/pfSense/xmlrpc.php";
    $params = array("pkg" => 'all', "info" => array('version', 'name'));
    $msg = new XML_RPC_Message('pfsense.get_pkgs', array(php_value_to_xmlrpc($params)));
    $cli = new XML_RPC_Client($versioncheck_path, $versioncheck_base_url);
    $resp = $cli->send($msg);
    $raw_versions = $resp->value();
    return xmlrpc_value_to_php($raw_versions);
}
开发者ID:hynnet,项目名称:xmlrpc-server,代码行数:12,代码来源:pkg_tester.php


示例12: get_firmware_version

function get_firmware_version($return_php = true)
{
    global $g;
    $versioncheck_base_url = "packages.pfsense.org";
    $versioncheck_path = "/xmlrpc.php";
    $params = array("pkg" => 'all', "info" => array('version', 'name'), "freebsd_version" => "10", "freebsd_machine" => "amd64");
    $msg = new XML_RPC_Message('pfsense.get_pkgs', array(php_value_to_xmlrpc($params)));
    $cli = new XML_RPC_Client($versioncheck_path, $versioncheck_base_url);
    $resp = $cli->send($msg);
    $raw_versions = $resp->value();
    return xmlrpc_value_to_php($raw_versions);
}
开发者ID:OpenTouch,项目名称:xmlrpc-server,代码行数:12,代码来源:pkg_tester.php


示例13: setData

 protected function setData()
 {
     $cmd = $this->db->createCommand("SELECT * FROM hr_horux_media_media WHERE id=:id");
     $cmd->bindParameter(":id", $this->id->Value, PDO::PARAM_INT);
     $query = $cmd->query();
     if ($query) {
         $data = $query->read();
         $this->id->Value = $data['id'];
         $this->name->Text = $data['name'];
         $deviceId = $data['id_device'];
         $cmd = $this->db->createCommand("SELECT * FROM `hr_horux_media` WHERE id_device=:id");
         $cmd->bindParameter(":id", $deviceId, PDO::PARAM_STR);
         $row = $cmd->query();
         $row = $row->read();
         require_once 'XML/RPC.php';
         $client = new XML_RPC_Client("RPC2", $row["ip"], $row["port"]);
         $msg = new XML_RPC_Message("horuxInfoDisplay.getMediaList");
         @($response = $client->send($msg));
         if ($response) {
             if (!$response->faultCode()) {
                 $v = $response->value();
                 $result = explode(",", html_entity_decode($v->scalarval()));
                 $media = array();
                 foreach ($result as $k => $v) {
                     $media[] = array("Value" => $v, "Text" => $v);
                 }
                 $this->media->DataTextField = 'Text';
                 $this->media->DataValueField = 'Value';
                 $this->media->DataSource = $media;
                 $this->media->dataBind();
                 if (count($media) > 0) {
                     $this->media->setSelectedValue($data['path']);
                 }
             } else {
                 $content_error = "ERROR - ";
                 $content_error .= "Code: " . $response->faultCode() . " Reason '" . $response->faultString() . "'<br/>";
             }
         }
         $this->during->Text = $data['time'];
         if ($data['type'] == "IMAGE") {
             $this->picture->setChecked(true);
         }
         if ($data['type'] == "MOVIE") {
             $this->movie->setChecked(true);
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:horux-svn,代码行数:47,代码来源:modMedia.php


示例14: fetchData

 function fetchData($username, $password)
 {
     $rpc = new XML_RPC_Client('/xmlrpc.php', 'pear.php.net');
     $rpc_message = new XML_RPC_Message("user.info", array(new XML_RPC_Value($username, "string")));
     // Error Checking howto ???
     $result = $rpc->send($rpc_message);
     $value = $result->value();
     $userinfo = xml_rpc_decode($value);
     if ($userinfo['password'] == md5($password)) {
         $this->activeUser = $userinfo['handle'];
         foreach ($userinfo as $uk => $uv) {
             $this->_auth_obj->setAuthData($uk, $uv);
         }
         return true;
     }
     return false;
 }
开发者ID:laiello,项目名称:coopcrucial,代码行数:17,代码来源:PEAR.php


示例15: sendPing

 function sendPing()
 {
     if (!$this->Commonping_Target) {
         return false;
     }
     // parse URL
     $parsedURL = parse_url($this->Commonping_Target);
     // send ping
     $client = new XML_RPC_Client($parsedURL["path"], $parsedURL["host"], 80);
     $this->Server_Response = $client->send($this->Ping_XML);
     // result
     if (get_class($this->Server_Response) == strtolower("XML_RPC_Response") && $this->Server_Response->faultCode() == false) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:17,代码来源:class.commonping.php


示例16: authenticate

 function authenticate($username, $password)
 {
     /* check it's livejournal.com */
     $email = '';
     $struct = new XML_RPC_Value(array('username' => new XML_RPC_Value($username, 'string'), 'hpassword' => new XML_RPC_Value(md5($password), 'string')), 'struct');
     $message = new XML_RPC_Message('LJ.XMLRPC.login');
     $message->addparam($struct);
     $client = new XML_RPC_Client('/interface/xmlrpc', 'www.livejournal.com', 80);
     $result = $client->send($message, 5);
     if ($result && !$result->faultCode()) {
         /* Carefuly noting that no LJ API returns the email address, */
         /* because they suck.                                        */
         return true;
     } else {
         return false;
     }
 }
开发者ID:Geeklog-Core,项目名称:geeklog,代码行数:17,代码来源:LiveJournal.auth.class.php


示例17: CheckForSpam

 /**
  * Check for spam links
  *
  * @param    string  $post   post to check for spam
  * @return   boolean         true = spam found, false = no spam
  *
  * Note: Also returns 'false' in case of problems communicating with SLV.
  *       Error messages are logged in Geeklog's error.log
  *
  */
 function CheckForSpam($post)
 {
     global $_SPX_CONF;
     require_once 'XML/RPC.php';
     $retval = false;
     if (empty($post)) {
         return $retval;
     }
     $links = $this->prepareLinks($post);
     if (empty($links)) {
         return $retval;
     }
     if (!isset($_SPX_CONF['timeout'])) {
         $_SPX_CONF['timeout'] = 5;
         // seconds
     }
     if ($this->_verbose) {
         SPAMX_log("Sending to SLV: {$links}");
     }
     $params = array(new XML_RPC_Value($links, 'string'));
     $msg = new XML_RPC_Message('slv', $params);
     $cli = new XML_RPC_Client('/slv.php', 'http://www.linksleeve.org');
     if ($this->_debug) {
         $client->setDebug(1);
     }
     $resp = $cli->send($msg, $_SPX_CONF['timeout']);
     if (!$resp) {
         COM_errorLog('Error communicating with SLV: ' . $cli->errstr . '; Message was ' . $msg->serialize());
     } else {
         if ($resp->faultCode()) {
             COM_errorLog('Error communicating with SLV. Fault code: ' . $resp->faultCode() . ', Fault reason: ' . $resp->faultString() . '; Message was ' . $msg->serialize());
         } else {
             $val = $resp->value();
             // note that SLV returns '1' for acceptable posts and '0' for spam
             if ($val->scalarval() != '1') {
                 $retval = true;
                 SPAMX_log("SLV: spam detected");
             } else {
                 if ($this->_verbose) {
                     SPAMX_log("SLV: no spam detected");
                 }
             }
         }
     }
     return $retval;
 }
开发者ID:hostellerie,项目名称:nexpro,代码行数:56,代码来源:SLVbase.class.php


示例18: sendRequest

 /**
  * The function that actually sends an XML-RPC request to the server, handles
  * errors accordingly and returns the appropriately decoded data sent as response
  * from the server.
  *
  * @param XML_RPC_Message $request An appropriately encoded XML-RPC message
  *                                  that needs to be sent as a request to the
  *                                  server.
  * @param XML_RPC_Client  $client  The XML-RPC client as which the request
  *                                  is to be sent.
  *
  * @return Array The appropriately decoded response sent by the server.
  */
 public static function sendRequest($request, $client)
 {
     $response = $client->send($request);
     if (!$response) {
         throw new Services_Blogging_Exception('XML-RPC communication error: ' . $client->errstr);
     } else {
         if ($response->faultCode() != 0) {
             throw new Services_Blogging_Exception($response->faultString(), $response->faultCode());
         }
     }
     $value = XML_RPC_Decode($response->value());
     if (!is_array($value) || !isset($value['faultCode'])) {
         return $value;
     } else {
         throw new Services_Blogging_Exception($value['faultString'], $value['faultCode']);
     }
 }
开发者ID:KonstantinKuklin,项目名称:Services_Blogging,代码行数:30,代码来源:XmlRpc.php


示例19: get_firmware_version

function get_firmware_version($return_php = true)
{
    global $g;
    $versioncheck_base_url = "packages.pfsense.org";
    $versioncheck_path = "/xmlrpc.php";
    if (isset($config['system']['alt_firmware_url']['enabled']) and isset($config['system']['alt_firmware_url']['versioncheck_base_url'])) {
        $versioncheck_base_url = $config['system']['alt_firmware_url']['versioncheck_base_url'];
    }
    $params = array("platform" => "pfSense", "firmware" => array("version" => "0.62.5", "branch" => "stable"), "kernel" => array("version" => "5.4"), "base" => array("version" => "5.4"));
    print_r($params);
    $msg = new XML_RPC_Message('pfsense.get_firmware_version', array(php_value_to_xmlrpc($params)));
    print "Formed message.\n";
    $cli = new XML_RPC_Client($versioncheck_path, $versioncheck_base_url);
    print "Formed client.\n";
    $cli->setDebug(1);
    $resp = $cli->send($msg);
    print "Message sent.\n";
    $raw_versions = $resp->value();
    return xmlrpc_value_to_php($raw_versions);
}
开发者ID:OpenTouch,项目名称:xmlrpc-server,代码行数:20,代码来源:xmlrpc_tester.php


示例20: UPMS_getNextVersion

function UPMS_getNextVersion($aServer)
{
    // Create the XML-RPC message
    $message = new XML_RPC_Message('OXUPMS.getNextID');
    // Create an XML-RPC client to talk to the XML-RPC server
    $client = new XML_RPC_Client($aServer['path'], $aServer['host'], $aServer['port']);
    $client->debug = 0;
    // Send the XML-RPC message to the server
    $response = $client->send($message, 60, 'http');
    // Was the response OK?
    if ($response && $response->faultCode() == 0) {
        $result = XML_RPC_decode($response->value());
        return $result;
    } else {
        if ($response->faultCode() > 0) {
            $result = $response->faultString();
        }
    }
    return $result;
}
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:20,代码来源:upms.inc.php



注:本文中的XML_RPC_Client类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP XML_RPC_Message类代码示例发布时间:2022-05-23
下一篇:
PHP XML_Parser类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap