USE YOUR OWN WU-KEY, not ours

b]@person(s) unknown:[/b] Please request your own WU key to test your own programs. Our key is for the benefit of all people testing the Leuven-Template.

Every new release I obtain a fresh WU-key for the users testing the Leuven-Template. Such a key gives all users together a maximum of 500 calls to obtain WU forecast data. For a normal forecast 1 or 2 calls , caching for 2 hours, about 20 max per day per user, only if everybody is testing 24/7 the WU-forecast. Far more then ever needed for this testing environment.

The WiKi says: http://wiki.leuven-template.eu/doku.php?id=en:forecast_settings

If you want to use the one page WU forecast you have to Visit http://www.wunderground.com/weather/api/ to request a free key and modify with your key the $SITE['wuKey'] setting.
Also the comments in the wsUserSewttings.php tells the same:
$SITE['wuKey']		= 'ef6aea4f006e5dda'; 	// ##### set to your (free) Wunderground API key to retreive weatherinfo in xml

As far as I know I did not say: Use the test-key to develop your own WU programs retrieving data in JSON format.

At least 1 person is doing that without even caching the data.

Someone else is refreshing a page every 20 seconds but he/she is using the wrong latitude/longitude in his settings:

If you live in or close to Portland you should modify your settings and set longitude to a negative value:
This call by the scripts is invalid http://api.wunderground.com/api/api/--key--/almanac/lang:EN/q/[b]45.5,122.7[/b].xml and returns no data. So next time the page is reloaded a new request for almanac data will be generated, resulting again in invalid data.

As the USA ha a minus longitude as it is east of Greenwhich the scipt needs to do the call this way
http://api.wunderground.com/api/api/--key--/almanac/lang:EN/q/[b]45.5,-122.7[/b].xml

I know your WeatherDisplay program does not use that -, but the rest of the world use a minus longitude for the USA.

Today there were already at 05:30 EDT more than 700 calls and more than 3 calls / minute. So in less then 6 hours 700 calls!
WU checks the usage for 24-hour periods based on U.S. Eastern Time.

The result is that one of the coming days WU will block all use of the key for the remainder of the day.

So please at ALL persons testing the template: get your FREE key at the WU website, as explained in the WiKi. Use that key for your site.

If one of the coming days the current test-key stops working => do not post about it. I can not help you with this.

Wim

You should ship the script without the key.

How “good-feeling” it ever is to have the key attached to the script will there allways be someone who use it wrong. Therefore its better to never have any such keys included even if they are free. Just have an explanation how the user gets his/her own key.

I agree with Henkka… I ship WU-forecast.php without a key and a prominent ‘nag’ message saying how to get and install the key that appears until a key is installed. :slight_smile:

As both knowledgable posters above probably will understand, it is difficult to change a habit. So I used another API-key and it worked for a few months. But again, yesterday someone used 2000 calls, today probably 3000 calls.

Those keys will invalidate shortly, and as of today, the template download does not contain a test-key anymore.

Wim