Hi, I am sure i heard this was a 6 or 12 hourly update for the forecast, but mine always says 1am, so i take it its updated every 24 hours?
I’m not sure of the frequency of updates for the international forecasts … it may be only once a day for some locations.
If you’d rather have a PHP script that does a bunch more than my tired old Perl program,
check out this thread announcing the WU-forecast.php script. Now folks outside the US and Canada can enjoy a carterlake-style forecast for their location from WeatherUnderground.
Best regards,
Ken
Hi,
I too am attempting to link to Wunderground for a 5 day forecast for my website, but have been unsuccessful so far. I am able to get the images and place them onto my web page (not on there at the moment…in test mode!), but cannot link it so that it is live.
I asked Bashey earlier today as he has the 5 day forecast on his site, and he referred me to this thread. I have read through this thread but to be honest it’s all a bit too technical for me! Can anybody explain what I need to do to get the code for the live link to ‘Thames Tower’ in Wunderground?
Cheers!
Here is the zip file setup for thames tower
You will need to edit the 2 paths in the WU-forecast.pl files (near the top)
Upload it to the directory where your weather site is.
You will then need to add it to your page, you can use an iframe e.g.
<iframe> www.yourwebsite.com/forecast-5day.htm</iframe
If you edit that with your site url to the file you have just uploaded
then add that code to the page where you want the 5 day forecast
it will then show on that page
Do the same for the 7 day forecast, /forecast-7day.htm
Once you have it showing on your site you will then need to add a cron
to get it to pull the info from wunderground. you will need to get advice
from someone else with regards to the cron sorry…
london thames.zip (11.4 KB)
What’s working at mine:
Make a wxlocal29.html with
<?php include("forecast-5day.htm"); ?> <?php include("forecast-7day.htm"); ?>in it (use a template of ken)
WD then makes a WX*.html
3 time a day I run System Schedular to xcopy wx29.html → wx29.php
upload it to my webside and it’s running (in my case html → php won’t run in WD)
http://www.weersverwachtingen.eu/wx26.php
still working on it with css styles 8)
Iframe works as well
set
<center><IFRAME SRC="forecast-5day.htm" WIDTH="100%" HEIGHT="200" FRAMEBORDER="0" SCROLLING="no"></IFRAME></center>
in datahtm0.txt
Look for it somewere in my
http://www.weersverwachtingen.eu/weerbericht.htm
Hi Bashy,
I’ve just done what you’ve said…I’m just waiting to see if it uploads to my website before I continue.
Many thanks,
Tony
Edit: disregard this post as I was having a “senior” moment
You can run the script by entering the address into the browser my test one was
http://82.163.126.237/fcast/WU-forecast.pl so you get the idea
Dont wait for it to run no need just give it a push
Steve
Stumpey,
I’ve just checked my front page and all I’m getting is a blank box???
Not sure what’s gone wrong, but I’ll wait for it to upload and then check it again.
Regards,
Tony
Sorry I am talking rubbish apologies
you need to run it in a command window not the browser if you are testing it on a local pc…I’ll get my coat…
Steve
Asprey
got the script working it looks like this
http://82.163.126.237/webgfx/forecast-5day.htm
http://82.163.126.237/webgfx/forecast-7day.htm
Ok have you set the WU-forecast.pl to executable
Have you set forecast-5day.htm & forecast-7day.htm to read / write
best to get it running on your local pc before trying to shift it to web servers then you know it works
There is a file called HOW TO in the zip should help explain also a bash script called get.sh for the cron to run.
Steve
Hi Stumpey,
I’ve just PM’d you.
Regards,