增加 获取天气插件

This commit is contained in:
LyLme 2022-04-04 17:50:02 +08:00
parent 469789444d
commit 640a44a9be
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<?php
/*
作者:D.Young
主页https://blog.5iux.cn/
githubhttps://github.com/5iux/sou
日期2020-05-19
版权所有,请勿删除
本天气插件为申请地址:和风天气-https://dev.heweather.com/
*/
header('Content-Type:application/json; charset=utf-8');
header('Access-Control-Allow-Methods:POST');
header('Access-Control-Allow-Headers:x-requested-with,content-type');
$address=$_SERVER["REMOTE_ADDR"];
$key="9d714f8dd6b94c7696f9cea8dc3ed1c5";
$jsonlist = file_get_contents("https://free-api.heweather.net/s6/weather/?location=".$address."&key=".$key);
echo $_GET["callback"].$jsonlist;
?>