婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁(yè) > 知識(shí)庫(kù) > PHP實(shí)現(xiàn)新型冠狀病毒疫情實(shí)時(shí)圖的實(shí)例

PHP實(shí)現(xiàn)新型冠狀病毒疫情實(shí)時(shí)圖的實(shí)例

熱門標(biāo)簽:山西探意電話機(jī)器人 騰訊外呼管理系統(tǒng) 山西回?fù)芡夂粝到y(tǒng) 岳陽(yáng)外呼型呼叫中心系統(tǒng)在哪里 百應(yīng)電話機(jī)器人服務(wù) 河南電銷卡外呼系統(tǒng)哪家強(qiáng) 青島語(yǔ)音外呼系統(tǒng)招商 揚(yáng)州地圖標(biāo)注app 昭通辦理400電話

我們先來(lái)看一下運(yùn)行圖

下面我們來(lái)看源代碼:

?php
//抓取抖音的接口數(shù)據(jù)
global $nCov_data;
$nCov_data['data']=get_nCoV_douyin_news();
$nCov_data['total']=get_nCoV_douyin_total();
function get_nCoV_douyin_news(){
 $content=@file_get_contents('https://i.snssdk.com/api/feed/forum_flow/v1/?forum_id=1656388947394568is_web_refresh=1channel=local_testquery_id=1656388947394568tab_id=1656388947394584is_preview=1stream_api_version=82aid=13forum_id=1656388947394568is_preview=0');
 $c=count(json_decode($content)->data)-1;
 $getInfos=@json_decode(json_decode($content)->data[$c]->content)->sub_raw_datas;
 if ($getInfos){
  foreach ($getInfos as $k=>$Info){
   $data[$k]=[
    'showtime'=>$Info->raw_data->showtime_string,//展示時(shí)間
    'desc'=>$Info->raw_data->desc,//簡(jiǎn)訊
    'event_time'=>$Info->raw_data->event_time//真實(shí)播報(bào)時(shí)間
   ];
  }
  return $data;
 }else{
  return false;
 }

}
function get_nCoV_douyin_total(){
 $content=@file_get_contents('https://i.snssdk.com/forum/home/v1/info/?forum_id=1656388947394568is_web_refresh=1');
 $getInfos=@json_decode(json_decode($content)->forum->extra->ncov_string_list);
 $data['desc']=@json_decode($content)->forum->rich_content;
 $data['img']=@json_decode($content)->forum->extra->ncov_image_url;
 if ($getInfos){
  foreach ($getInfos as $k=>$Info){
   $data['provinces'][$k]=$Info;
  }
  return $data;
 }else{
  return false;
 }
}
?>
!doctype html>
html lang="zh">
head>
 meta charset="UTF-8">
 meta name="viewport"
   content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
 meta http-equiv="X-UA-Compatible" content="ie=edge">
 meta author="__Mark_Cheng__QQ72817">
 link rel="stylesheet" href="CSS/index.css" rel="external nofollow" >
 title>實(shí)時(shí)更新:新型冠狀病毒肺炎疫情/title>
/head>
body>
 div class="view">
  div class="header">
   div class="title">新型冠狀病毒肺炎/div>
   div class="to-title">疫情通報(bào)/div>
  /div>
  div class="show">
   div class="total">
    p class="title">span>實(shí)時(shí)疫情狀況/span>span>數(shù)據(jù)抓取時(shí)間:?php echo date('Y.m.d H:i');?>/span>/p>
    p class="desc">?php echo $nCov_data['total']['desc'];?>/p>
   /div>
   div class="map">
    img src="?php echo $nCov_data['total']['img'];?>" alt="實(shí)時(shí)地圖" width="100%">
   /div>
   div class="list">
    ul>
     ?php
     foreach ($nCov_data['total']['provinces'] as $key=>$val){
      echo 'li>span>'.$val.'/span>/li>';
     }
     ?>
    /ul>
   /div>
   div class="timeline">
    div class="title">疫情追蹤/div>
    div class="c">
     ?php
      foreach ($nCov_data['data'] as $key=>$val){
     ?>
     div class="content">
      div class="i">/div>
      div class="c">
       div class="show_time">
        ?php echo date('m月d日 H:i',$val['event_time']);?>
       /div>
       div class="desc">
        ?php echo $val['desc'];?>
       /div>
      /div>
     /div>
     ?php
     }
     ?>
    /div>
   /div>
   div class="tip">
    img src="https://mat1.gtimg.com/news/images/inews/2020/feiyan/18/img/prevent.png" alt="溫馨提示" width="100%">
   /div>
  /div>
 /div>
/body>
/html>

分析:其中PHP代碼中的圖片路徑可以自己保存到本地進(jìn)行修改。

感謝大家的學(xué)習(xí)和對(duì)腳本之家的支持。

您可能感興趣的文章:
  • python+selenium定時(shí)爬取丁香園的新型冠狀病毒數(shù)據(jù)并制作出類似的地圖(部署到云服務(wù)器)
  • node爬取新型冠狀病毒的疫情實(shí)時(shí)動(dòng)態(tài)
  • 將新型冠狀病毒轉(zhuǎn)二進(jìn)制的代碼(首發(fā))
  • Python抓新型冠狀病毒肺炎疫情數(shù)據(jù)并繪制全國(guó)疫情分布的代碼實(shí)例
  • Python實(shí)現(xiàn)新型冠狀病毒傳播模型及預(yù)測(cè)代碼實(shí)例
  • Python實(shí)現(xiàn)實(shí)時(shí)數(shù)據(jù)采集新型冠狀病毒數(shù)據(jù)實(shí)例
  • python模擬預(yù)測(cè)一下新型冠狀病毒肺炎的數(shù)據(jù)
  • 使用Python制作新型冠狀病毒實(shí)時(shí)疫情圖
  • pyecharts繪制中國(guó)2020肺炎疫情地圖的實(shí)例代碼

標(biāo)簽:鎮(zhèn)江 宜賓 寶雞 南陽(yáng) 湛江 黃南 銅川 婁底

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《PHP實(shí)現(xiàn)新型冠狀病毒疫情實(shí)時(shí)圖的實(shí)例》,本文關(guān)鍵詞  PHP,實(shí)現(xiàn),新型,冠狀,病毒,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《PHP實(shí)現(xiàn)新型冠狀病毒疫情實(shí)時(shí)圖的實(shí)例》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于PHP實(shí)現(xiàn)新型冠狀病毒疫情實(shí)時(shí)圖的實(shí)例的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 玉环县| 康乐县| 汤阴县| 容城县| 五指山市| 都兰县| 鲁山县| 买车| 蓬溪县| 安福县| 元江| 灵川县| 土默特左旗| 大冶市| 双峰县| 怀宁县| 阜城县| 大渡口区| 淳化县| 中西区| 任丘市| 苍梧县| 平罗县| 太仆寺旗| 瑞昌市| 邳州市| 凉山| 天台县| 安溪县| 城固县| 冕宁县| 芜湖县| 营口市| 安岳县| 仁怀市| 石泉县| 鸡西市| 溧水县| 梁山县| 英山县| 荔波县|