今天@Light'访问我的博客,发现他的网站里面有这条接口,尝试去查来一下发现这东西网上能抓,然后就抓了条接口写的垃圾代码,下面贴代码

/**
* 那年今日API
* @author Reaper <a@0oo.ren>
* @request https://www.52bz.la
* @return string
*/
public function that_year()
{
   $json =  file_get_contents('http://www.todayonhistory.com/index.php?m=content&c=index&a=json_event&page=1&pagesize=40&month='.date('m').'&day='.date('d'));
   $array = json_decode($json,1);
   return $array[rand(0,count($array)-1)]['title'];
}
最后修改:2023 年 07 月 25 日
您的赞赏是对我最大的支持。