<?php
require_once 'curl.func.php';
$appkey = 'your_appkey_here';//你的appkey
$keyword = '神农以赭鞭鞭百草';//utf8
$pagesize = 1;
$pagenum = 1;
$url = "https://api.jisuapi.com/soushenji/search?appkey=$appkey&keyword=$keyword&pagesize=$pagesize&pagenum=$pagenum";
$result = curlOpen($url, ['ssl'=>true]);
$jsonarr = json_decode($result, true);
//exit(var_dump($jsonarr));
if($jsonarr['status'] != 0)
{
echo $jsonarr['msg'];
exit();
}
$result = $jsonarr['result'];
echo $result['total'].' '.$result['pagesize'].' '.$result['pagenum'].'
';
foreach($result['list'] as $val)
{
echo $val['detailid'].' '.$val['name'].' '.$val['content'].' '.$val['commentary'].' '.$val['translation'].' '.$val['appreciation'].' '.$val['interpretation'].'
';
}