Author Topic: PHP Script to Display Your Wunderground Historical Data  (Read 31928 times)

0 Members and 1 Guest are viewing this topic.

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #75 on: February 03, 2012, 10:02:05 AM »
And now this thread is even older. :lol: 

Several people have found that the script is being blocked by Wunderground and in corresponding with them, if the script requested a date in the future it caused them problems.  This could happen with bot activity or being selected by one of your users, so if you're using the script please get a new copy at http://jcweather.us/scripts.php and update.  Dates selected in the future will be kicked back to the current date.

If you find you are now being blocked you'll have to contact them to get unblocked, and tell them you've updated the script.  An Email to support@wunderground.com will do it.  Sorry for any inconvenience.

Thanks.  - Jim

Forum Search and Google Can be Your Best Friends

Offline jay_hoehn

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 656
    • Jay's Woodcrafts
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #76 on: February 03, 2012, 01:13:56 PM »
Jim,

This fix doesn't seem to be applied to the template plugin on Ken's site.  I guess that will come with the next updates.  I was able to make the addition on my own.

Thanks,

Jay
Davis Vantage Pro2 Plus
VVP
Weather Display


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #77 on: February 03, 2012, 01:59:26 PM »
Jim,

This fix doesn't seem to be applied to the template plugin on Ken's site.  I guess that will come with the next updates.  I was able to make the addition on my own.

Thanks,

Jay

Likewise.  It's a pretty straightforward cut and paste.

Thanks Jim & Jay!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #78 on: February 03, 2012, 03:12:18 PM »
Thanks for the update Jim!

Offline Stetson1

  • Cordera Weather
  • Forecaster
  • *****
  • Posts: 364
    • Cordera Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #79 on: February 03, 2012, 03:20:06 PM »
Can someone share the code change needed? Can I simply edit the wu-history.php file or do I need to go through the entire install process again?

Todd

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #80 on: February 03, 2012, 04:14:51 PM »
Sure, if you have a fairly recent version just insert lines 233-237 in your copy right after

$isToday = strtotime($reqdate) == strtotime(date("d-m-Y"));

whatever that line is on.

- Jim

Forum Search and Google Can be Your Best Friends

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #81 on: February 03, 2012, 04:56:08 PM »
I tried that fix here and it still doesn't work. The graphs appear, but the table is blank.

Chris

Offline jmcmurry

  • Jim McMurry
  • Forecaster
  • *****
  • Posts: 528
  • Davis Vantage Pro 2 Plus Wireless.
    • Juneau County Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #82 on: February 03, 2012, 05:15:40 PM »
Check out the posts a little ways above.  You'll need to contact Wunderground to get unblocked.  The script change is at their request and to prevent future problems.

- Jim

Forum Search and Google Can be Your Best Friends

Offline dasman

  • Forecaster
  • *****
  • Posts: 491
    • Wx Peotone
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #83 on: February 04, 2012, 10:32:30 AM »
Jim

Thanks for the update!  Seems to work perfectly.  I selected a date later in the month and it kicked back to today.

Thanks again.

Dave
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline mth

  • Member
  • *
  • Posts: 38
    • Relay, Maryland Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #84 on: February 04, 2012, 02:27:13 PM »
I too applied the latest version and am getting no data.  I've submitted a request to WU.

Michael
Michael Holden
Relay, Maryland Weather Station
http://www.relayweather.com
Davis Vantage Pro 2  -  Model 6153
 


Offline Stetson1

  • Cordera Weather
  • Forecaster
  • *****
  • Posts: 364
    • Cordera Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #85 on: February 04, 2012, 04:54:09 PM »
Submitted a request to WU Support. They are probably backlogged so I'll give it a few days.

Todd

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #86 on: February 04, 2012, 05:33:17 PM »
I've updated the wxwuhistory.php page and the WU-History-inc.php from Jim's V2.7 WU-History script.

Corrections in wxwuhistory.php for older PHP syntax, and added a

<meta name="robots" content="index, nofollow" />

to the page to (hopefully) prevent search bots from running amok with links in the first place.

The WU-History-inc.php file does have Jim's code to prevent browsing to future dates.

Note: this script is currently English-only and translation functions are not currently in the code.

Thanks Jim for keeping the script alive :)  I see you added a User-agent: string in the request also .. that should help WU know where the requests come from like my update to WU-forecast does :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #87 on: February 04, 2012, 10:06:28 PM »
Ken,

Is this script available somewhere?

Regards,
Chris
moreheadcityweather.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: PHP Script to Display Your Wunderground Historical Data
« Reply #88 on: February 04, 2012, 10:08:59 PM »
Hi Chris,
If you mean the WU-History script 'template-ized', then yes...

http://saratoga-weather.org/wxtemplates/plugins.php#wxwuhistory
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP