首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > PHP > PHP库的多个远程程序调用加密和压缩协议

PHP库的多个远程程序调用加密和压缩协议

  • 资源大小:1.05 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: php rpc client-server

资 源 简 介

Important There is also GIT hosted version of this library, see MultiRPC on GitHub. Usage example Server ``` class A { public $a1; public $a2; public function __construct($a1 = null, $a2 = null) { $this->a1 = $a1; $this->a2 = $a2; } public function setA1($a1) { $this->a1 = $a1; } public function sum($a1, $a2) { return $a1 + $a2; } public static function concat($a1, $a2) { return $a1 . $a2; } public function getObject() { return $this; } public static function getInstance() { return new A(); } public function getNull() { return null; } } $server = new RPCServer(new RPCProtocol(RPCSECUREKEY)); $server->runRpc(); $server->response["some"] = array("custom" => "response var"); $server->sendResponse(); ``` Client ``` /****************************************
VIP VIP
0.175658s