nav-site/template/5iux/wea/index.php

18 lines
608 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;
?>