cloudy

Author Topic: WU-forecast.php now inoperative [RESOLVED]  (Read 449 times)

0 Members and 2 Guests are viewing this topic.

Offline saratogaWX

  • Posts: 4,672
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win XP
  • Firefox 10.0
    • Saratoga Weather
WU-forecast.php now inoperative [RESOLVED]
« on: February 03, 2012, 05:19:20 PM »
Just a heads-up to all the World template users:  WeatherUnderground changed their website on 1-Feb-2012 and now disallow non-browser access to their main pages, and this has caused the WU-forecast.php script to become inoperative, and really not fixable.  I'm redesigning the WU-forecast.php script (V2) to use their new JSON API instead, and I hope to have a release in the next couple of days.  Meanwhile, your dashboard and wxforecast.php pages will be missing the icons and text for your forecasts.

Sorry for the inconvenience.

Best regards,
Ken

Edit:
Problem actually caused by WU blocking certain IP addresses for excess activity (likely from search bots following links on pages like WU-History provided.  Both Jim and I have updated scripts to prevent this, and WU-forecast.php now follows the 301 redirect to the block page so you can see which IP address needs unblocking by WU.
« Last Edit: February 08, 2012, 09:41:36 PM by saratogaWX »
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline saratogaWX

  • Posts: 4,672
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win XP
  • Firefox 10.0
    • Saratoga Weather
Re: WU-forecast.php issue [RESOLVED]
« Reply #1 on: February 04, 2012, 04:15:06 AM »
Status update:

I talked via email with John Celenza of WeatherUnderground and the issue with the WU-forecast.php script was caused by an IP block by WunderGround on my server's IP address.  They have kindly removed the block, and the script works again.

I did do an update to WU-forecast.php V1.28 tonight to add the ability to follow the 301 redirect to their block.asp page, and cache the contents in the cache file.  If it happens that you find no forecast, even after doing a ?force=1 to force a cache refresh, then check the contents of your cache file (do a view source on the page to find the name/location of the file), and in the file will be the text of the block page .. you can use the IP address there to contact WU to ask the block be removed.

I also changed the request to include a User-agent: PHP,WU-forecast.php,saratoga-weather.org so they can identify that the request was made by the WU-forecast.php script (and that they should contact me for questions).

Sorry for the alarm .. in short:
1) WU was blocking some IPs for excessive traffic (I think)
2) The script couldn't get past the block, so stopped offering you a forecast.
3) the updated script V1.28 has diagnostics to help you put a request to WU to unblock if it happens to you

Updates for V3 template users or for non-template users.

I am working (and about 80% finished) with a WU API JSON script and will release it later, but the WU-forecast.php can live on to serve :)

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 16.0.912.77
    • Weather at Silkeborg, Denmark
Re: WU-forecast.php now inoperative due to WU website restrictions
« Reply #2 on: February 04, 2012, 06:31:44 AM »
Hi Ken

Thanks for the update and work on this. I just tried upgrading to your newest WU-script - but I cant get it working:

http://www.silkeborg-vejret.dk/vejrudsigt/WU-forecast/WU-forecast.php?force=1

Can you see what might be wrong?

Best regards,

Henrik

Offline saratogaWX

  • Posts: 4,672
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
  • OS/Browser:
  • Win XP
  • Firefox 10.0
    • Saratoga Weather
Re: WU-forecast.php now inoperative due to WU website restrictions
« Reply #3 on: February 04, 2012, 03:19:17 PM »
Hi Henrik,

Doing a view-source on that page shows:

Quote
<!-- WU-forecast.php (ML) Version 1.28- 03-Feb-2012 -->
<!-- loading from http://danish.wunderground.com/global/stations/06060.html. -->
<!-- RC=301 Moved Permanently, bytes=434 -->
<!-- following to http://danish.wunderground.com/block.asp --->
<!-- RC=200 OK, bytes=830 -->
<!-- unable to open ./WU-forecast-0-dk.txt for writing. -->

So your IP is still blocked by WunderGround.  Unfortunately, because the ./WU-forecast-0-dk.txt file is not writable, we can't see the contents of the cache, which would have the IP address that is blocked.  Allow the ./WU-forecast-0-dk.txt file to be written first, then look at it's contents.  Send an email to the address inside the file asking that that IP address be unblocked.

The new WU-forecast.php doesn't 'fix' the block, it only gives you enough data in the cache file for you to ask WunderGround to unblock a specific IP address so you can get your forecasts again.

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • Chrome 16.0.912.77
    • Weather at Silkeborg, Denmark
Re: WU-forecast.php now inoperative due to WU website restrictions
« Reply #4 on: February 04, 2012, 05:04:13 PM »
Hi Ken

Ahh - I forgot to CHMODD WU-forecast folder to 777 - now I see the cachefile with this:

Code: [Select]
HTTP/1.1 200 OK
Date: Sat, 04 Feb 2012 17:59:08 GMT
Server: Apache/1.3.33 (Unix) PHP/4.4.0
Cache-control: no-cache, must-revalidate, no-cache="Set-Cookie", private
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
X-CreationTime: 0.025
Set-Cookie: ASC=1328378348:1; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
Set-Cookie: DT=1328378348:10193:365-u1; path=/; expires=Fri, 01-Jan-2020 00:00:00 GMT; domain=.wunderground.com
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

108
<b>Request Blocked</b>
<br><br>
Your request to Wunderground.com has been blocked. To get this block removed, please contact wunderground.com:
<br>
Your IP is 213.239.218.78, USER_AGENT PHP,WU-forecast.php,saratoga-weather.org
<br>
Email: support@wunderground.com

0

I have already sent message to Wunderground - now just to wait and hope they will open up for my servers IP-adress.

Thanks.

Best regards,

Henrik

Offline jwwd

  • Posts: 3,561
  • Silkeborg, Denmark (56:10:58 N-09:30:26 E) - Elevation 75,35 meters
  • OS/Browser:
  • Win XP
  • Firefox 10.0
    • Weather at Silkeborg, Denmark
Re: WU-forecast.php now inoperative due to WU website restrictions
« Reply #5 on: February 08, 2012, 10:07:10 AM »
Hi again

Just a follow up - Kens lastest WU-forecast script is now working after WU removed the blocking of my servers IP-adress.

I got this reply from  WU:

Code: [Select]
Hello,

We have unblocked your IP.  Please note that there was an error in the script that you were using that caused the block.
Please make sure that you now use the patched script to obtain the data.

Please let us know if you have any questions.


We appreciate your continued support.

The Wunderground Support Team
http://www.wunderground.com/


Ticket Details
===================
Ticket ID: TCE-334423
Category: Bugs

Ken: Thank you very much for your work on this.

Best regards,

Henrik

Offline edje1205

  • edje
  • Posts: 1,838
  • Zaandam Holland, the Netherlands
  • OS/Browser:
  • Win 7/Srvr 2008R2
  • MS IE 9.0
    • http://www.weersverwachtingen.eu
Re: WU-forecast.php now inoperative due to WU website restrictions
« Reply #6 on: February 08, 2012, 03:09:23 PM »
Hi all,


No problem receiving the forecast here now
http://www.weersverwachtingen.eu/clientraw/wd-ajax-ml/wxforecast.php

Did have no forecasts for a couple of days indeed, but doing nothing while waiting on Ken's solution ahum.. (thanks Ken for the good works  :D )
starting yesterday it works all oke again  8O
Maybe more people were reacting on their changes on/off/on ?

Really don't know what's the policy of WU
Anyway, would like to know to you......
Ed
Woodenshoes,mills,hightech;but random weather
www.weersverwachtingen.eu
P4 2,2Ghz-2GB RAM-Win2K-Broadb.connect


Offline edje1205

  • edje
  • Posts: 1,838
  • Zaandam Holland, the Netherlands
  • OS/Browser:
  • Win XP
  • MS IE 8.0
    • http://www.weersverwachtingen.eu
Re: WU-forecast.php now inoperative [RESOLVED]
« Reply #7 on: February 22, 2012, 09:53:03 AM »


Worked till 12 feb  :oops: and then no more temps so no forecast and comparasion script working
New version now all oke

when will it ever stop downthere WU ?

Thanks Ken !  :)
Ed
Woodenshoes,mills,hightech;but random weather
www.weersverwachtingen.eu
P4 2,2Ghz-2GB RAM-Win2K-Broadb.connect


 

cumulus