名称 | 必填 | 类型 | 说明 |
---|---|---|---|
city | 否 | string | 城市疫情 |
{"success":true,"data":{"updatetime":"2022-11-03 09:28:47","country":"中国","province":"江苏省","city":"南京","now":{"sure_new_loc":2,"sure_new_hid":7,"sure_present":206},"history":{"sure_cnt":601,"cure_cnt":395,"die_cnt":"-"},"danger":{"high_risk":26,"medium_risk":3}}}
自行调用
<?php
header("Content-Type:text/json;charset=UTF-8"); date_default_timezone_set("PRC"); $city = $_GET["city"]; $url = "https://api.vvhan.com/api/covid?city=" . $city; $data = file_get_contents($url); echo $data;
?>