function getDan28(){
$result = S('dandata');
if (empty($result)) {
$url="http://api.1680210.com/LuckTwenty/getPcLucky28.do?issue=";
$result =curlGet($url);
S('dandata',$result,5);
}
$data = json_decode($result,true);
$data=$data['result']['data'];
$dandata['time'] =time();
$dandata['game'] = 'pc28';
$dandata['current']['periodNumber'] = $data['preDrawIssue'];
$dandata['current']['awardTime']=$data['preDrawTime'];
$dandata['current']['awardNumbers']=$data['preDrawCode'];
$dandata['next']['periodNumber']=$data['drawIssue'];
$dandata['next']['awardTime']=$data['drawTime'];
$dandata['next']['awardTimeInterval']= (strtotime($data['drawTime'])-time())*1000;
$dandata['next']['delayTimeInterval'] =0;
return $dandata;
}
public function getDan28(){
echo json_encode(getDan28());
die();
}
调用的时候直接使用