1

当我使用浏览器访问http://forecast.weather.gov/MapClick.php?lat=38.4247341&lon=-86.9624086&FcstType=json时,我看到了预期的回报(我喜欢它)。

在 PHP 中我写 $jj = file_get_contents(" http://forecast.weather.gov/MapClick.php?lat=38.4247341&lon=-86.9624086&FcstType=json ");

我收到一条错误消息“HTTP/1.0 403 Forbidden”。

有没有办法将数据从http://forecast.weather.gov/MapClick.php?lat=38.4247341&lon=-86.9624086&FcstType=jsonPHP 中获取?注意:一旦我在 PHP 中有 JSON 数据,我就知道如何处理它。

谢谢你。休伯特·哈尔金

4

0 回答 0