当前位置: 首页>>代码示例>>PHP>>正文


PHP jsonRPCClient::giveMeSomeData方法代码示例

本文整理汇总了PHP中jsonRPCClient::giveMeSomeData方法的典型用法代码示例。如果您正苦于以下问题:PHP jsonRPCClient::giveMeSomeData方法的具体用法?PHP jsonRPCClient::giveMeSomeData怎么用?PHP jsonRPCClient::giveMeSomeData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jsonRPCClient的用法示例。


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

示例1: Format

$_PHP_SELF;
?>
" method="POST">
<b>Select the format you want to view the system uptime on</b><br>
  <input type="radio" name="name" value=" ">Normal format<br>
  <input type="radio" name="name" value="-s">MM:HH:SS format<br>
  <input type="radio" name="name" value="-p">Short Format<br>
    <input type="radio" name="name" value="find">Windows Format (Only on Windows Systems)<br>
<br><input type="Submit" /><br>
      </form>                                      
                   
   </body>

<?php 
require_once 'jsonRPCClient.php';
$myExample = new jsonRPCClient('http://127.0.0.1/dvws/vulnerabilities/cmdi/server.php');
// performs some basic operation
try {
    echo 'This application is using <i>' . $myExample->giveMeSomeData('name') . ' to execute commands:</i><br />' . "\n";
    $myExample->changeYourState('I am using this function from the network');
} catch (Exception $e) {
    echo nl2br($e->getMessage()) . '<br />' . "\n";
}
if (isset($_POST["name"])) {
    echo '<br /><b>The current system uptime is</b><br />' . "\n";
    try {
        echo $myExample->getsystemstatus($_POST["name"]);
    } catch (Exception $e) {
        echo nl2br($e->getMessage());
    }
}
开发者ID:johnjohnsp1,项目名称:dvws,代码行数:31,代码来源:client.php

示例2: jsonRPCClient

<?php

require_once 'jsonRPCClient.php';
$myExample = new jsonRPCClient('http://jsonrpcphp.org/server.php');
// performs some basic operation
echo '<b>Attempt to perform basic operations</b><br />' . "\n";
try {
    echo 'Your name is <i>' . $myExample->giveMeSomeData('name') . '</i><br />' . "\n";
    $myExample->changeYourState('I am using this function from the network');
    echo 'Your status request has been accepted<br />' . "\n";
} catch (Exception $e) {
    echo nl2br($e->getMessage()) . '<br />' . "\n";
}
// performs some strategic operation, locally allowed
echo '<br /><b>Attempt to store strategic data</b><br />' . "\n";
try {
    $myExample->writeSomething('Strategic string!');
    echo 'Strategic data succefully stored';
} catch (Exception $e) {
    echo nl2br($e->getMessage());
}
开发者ID:soundasleep,项目名称:jsonrpcclient,代码行数:21,代码来源:client.php


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