wxflyer-wu.php problem


I am having problems setting the units on my flyer at: http://www.gosportweather.co.uk/Base-World/wxflyer-wu.php

I have noticed that several figures are using the wrong units. I would like the rain in mm, pressure in mb and temperature in C. I have noticed that on the WU forecast page of my site the wind is in Km/h instead of mph. how do I correct these units. I have attached the settings and wxflyer-wu files.

Settings.txt (14.7 KB)

wxflyer-wu.txt (13 KB)

In wxflyer-wu.php, change




You’re seeing the wrong units because the script is loading the testtags.php from the same directory, and it’s my sample tags.
Your settings have

$SITE['WXtags] = './live/testtags.php';

so the above change should fetch those values.


Thank you that has sorted that. Just one final thing I have noticed the dates listed by the records and on the homepage seem to be in US format instead of UK format. I have checked the settings but can’t get it to change. How do I fix this?

The WXflyer script didn’t have a setting for the record dates to use mm/dd/yyyy or dd/mm/yyyy … it assembled those dates directly from the individual WD tags for year, month and day in code like

<?php echo $mrecordhighgustmonth ?>/<?php echo $mrecordhighgustday ?>/<?php echo $mrecordhighgustyear ?></td>

which you would need to rearrange as

<?php echo $mrecordhighgustday ?>/<?php echo $mrecordhighgustmonth ?>/<?php echo $mrecordhighgustyear ?></td>

to have it print that date in dd/mm/yyyy format. There are several places in the code that will need such a change.

Best regards,