google-weather-api

Problem on Google weather report calcuation

只谈情不闲聊 提交于 2019-12-11 15:48:22
问题 This is about the Google Weather Report XML. What is the calculation Google is doing? When I google with weather=London,UK keyword, it's showing something like this screen shot, alt text http://img293.imageshack.us/img293/4746/weathergoogle.jpg In my XML there is nothing like 26, 11, 26, 22 no My XML look like below. What is the calculation involved in the weather report? How to get these into PHP variable? 回答1: There is no calculation. The XML you linked has these nodes: <temp_f data="70"/>

Google Weather API returns HTTP 403 Error

戏子无情 提交于 2019-12-04 06:46:39
问题 I use the Google weather API in my web site, and today I get an error that the API link doesn't return any data. When I check the link directly I get an (Error 403). Here is the link. Can anyone please tell me a solution for this and provide me another link for the API? 回答1: Every now and then the API stops working for short periods of time, the last days more often a 403 is trown. For my site, last night it happened 13 times. But the site tries immediately again and the second or third time,

Google Weather API returns HTTP 403 Error

痞子三分冷 提交于 2019-12-02 12:34:33
I use the Google weather API in my web site, and today I get an error that the API link doesn't return any data. When I check the link directly I get an (Error 403). Here is the link . Can anyone please tell me a solution for this and provide me another link for the API? Every now and then the API stops working for short periods of time, the last days more often a 403 is trown. For my site, last night it happened 13 times. But the site tries immediately again and the second or third time, the data loads without problems. As the API is unofficial, not sure what’s causing the 403. Make sure you

How to hide or display a Google Maps Layer?

旧巷老猫 提交于 2019-11-29 07:34:32
I have prepared a simplified test case and a screenshot. I think I'm missing a tiny bit, just few lines of code. I have 2 overlays (the weather and clouds ) in my JavaScript Google Map and would like to hide or show them when a corresponding check box is clicked: Here is the test case, just paste it into an .html file and it will run: <!DOCTYPE HTML> <html> <head> <style type="text/css"> h1,p { text-align: center; } #map { width: 700px; height: 400px; margin-left: auto; margin-right: auto; background-color: #CCCCFF; } </style> <script type="text/javascript" src="https://maps.google.com/maps

Simplexml_load_string() fail to parse error

…衆ロ難τιáo~ 提交于 2019-11-27 14:10:09
I'm trying to load parse a Google Weather API response (Chinese response). Here is the API call. // This code fails with the following error $xml = simplexml_load_file('http://www.google.com/ig/api?weather=11791&hl=zh-CN'); ( ! ) Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xB6 0xE0 0xD4 0xC6 in C:\htdocs\weather.php on line 11 Why does loading this response fail? How do I encode/decode the response so that simplexml loads it properly? Edit: Here is the code and output. <?php $googleData

Google Weather API gone?

雨燕双飞 提交于 2019-11-26 05:49:32
问题 I had been using the following google weather api in my iPhone apps to get 4 day weather forecast. NSString *address = @\"http://www.google.com/ig/api?weather=Chicago\"; NSString *request = [NSString stringWithFormat:@\"%@\",address]; NSLog(@\"request: %@\", request); NSURL *URL = [NSURL URLWithString:request]; NSError *error; NSString *XML = [NSString stringWithContentsOfURL:URL encoding:NSASCIIStringEncoding error:&error]; NSLog(@\"XML: %@\", XML); NSLog(@\"XML lenght: %d\", [XML length]);

Google Weather API gone?

我的梦境 提交于 2019-11-26 05:30:44
I had been using the following google weather api in my iPhone apps to get 4 day weather forecast. NSString *address = @"http://www.google.com/ig/api?weather=Chicago"; NSString *request = [NSString stringWithFormat:@"%@",address]; NSLog(@"request: %@", request); NSURL *URL = [NSURL URLWithString:request]; NSError *error; NSString *XML = [NSString stringWithContentsOfURL:URL encoding:NSASCIIStringEncoding error:&error]; NSLog(@"XML: %@", XML); NSLog(@"XML lenght: %d", [XML length]); As of yesterday Aug 25th, 2012 I get absolutely nothing back! I don't get any results back. When did this happen?