PEAR::XML_RPC
- XML_RPC_Client
サーバサイドのクライアントを設定
$server = new XML_RPC_Client (string $path, string $server [, integer $port [, string $proxy [, integer $proxy_port [, string $proxy_user [, string $proxy_pass]]]]])
<?php require_once("XML/RPC.php"); $xmlrpc_host = "192.168.1.1"; $xmlprc_path = "/hoge/hoge/hoge.php"; $server = new XML_RPC_Client ( $xmlprc_path , $xmlrpc_host ,80); []http://192.168.1.1/hoge/hoge/hoge.php[] に port80でアクセス ?>
- XML_RPC_Value
XML_RPCの値の作成
$Val = new XML_RPC_Value ()
$Val = new XML_RPC_Value ($stringVal)
$Val = new XML_RPC_Value ($scalarVal, 'int' | 'boolean' | 'string' | 'double' | 'dateTime.iso8601' | 'base64')
$Val = new XML_RPC_Value ($arrayVal, 'array' | 'struct')
-
- スカラー値を格納
<?PHP requiare_once("XML/RPC.php"); $value = new XML_RPC_Value( 99 ,'int'); $value = new XML_RPC_Value( 'hoge' , 'string'); ?>
-
- 連想配列を格納
<?php $Struct = new XML_RPC_Value( array( "hoge" => new XML_RPC_Value("HOGE"), "number" => new XML_RPC_Value(99, "int"), "geek" => new XML_RPC_Value("GEEK", "string")), "struct"); ?>