header("Content-Type:text/html;charset=UTF-8");
function nowapi_call($a_parm){
if(!is_array($a_parm)){
return false;
}
//combinations
$a_parm['format']=empty($a_parm['format'])?'json':$a_parm['format'];
$apiurl=empty($a_parm['apiurl'])?'http://api.k780.com/?':$a_parm['apiurl'].'/?';
unset($a_parm['apiurl']);
foreach($a_parm as $k=>$v){
$apiurl.=$k.'='.$v.'&';
}
$apiurl=substr($apiurl,0,-1);
if(!$callapi=file_get_contents($apiurl)){
return false;
}
//format
if($a_parm['format']=='base64'){
$a_cdata=unserialize(base64_decode($callapi));
}elseif($a_parm['format']=='js