zoomeư򥿥Ǹ

ǶΥưϤäѤzoomeǤ͡
̥礭̤礭ӥåȥ졼Ȥ⤤
˥ưήƤƤ褦˻פޤ
Ȥ櫓ǡzoomeΥPHPǡ

require_once 'XML/RPC.php';

$arr = array('tagname' => '',
             'offset' => 0,
             'length' => 10
             );
$params  = new XML_RPC_Value(array(
                                   'tagname' => new XML_RPC_Value($arr['tagname'], 'string'),
                                   'offset' => new XML_RPC_Value($arr['offset'], 'i4'),
                                   'length' => new XML_RPC_Value($arr['length'], 'i4'),
                                   ), "struct");

$msg = new XML_RPC_Message('zoome.tagSearch', array($params));
$cli = new XML_RPC_Client('/xmlrpc', 'up.zoome.jp', 80);
$res = $cli->send($msg);

if (!$res->faultCode()) {
  $data = XML_RPC_decode($res->value());
  /* "Total:". $data['count']; */
  foreach($data['list'] as $key => $val) {
    $zoome = array(
                   'zoomeid' => $val['zoomeid'],
                   'diaryid' => $val['diaryid'],
                   'title' => $val['title'],
                   'url' => $val['diaryurl'],
                   'body' => $val['body'],
                   );
  }
} else {
  exit('CODE:'.$res->faultCode(). ':'. $res->faultString());
}


ߤ򤤤ХȤۤǤ͡
ǥեȤǿȻפǤɡΥȤ餤Ϥۤʡ
¾ˤƤȤΥ᥽åɤΤǸɥȤ򻲾ȤƤߤƤ

͡zoome API(XML-RPC)ɥ