cross posted !!!
Like many others your banner version does not look for the later fields that have been added to realtime.txt.
in your case:
41 (field # 40) 36.0 10-minute high gust <#wgust>
42 (field # 41) 10.3 Heat index <#heatindex>
43 (field # 42) 10.5 Humidex <#humidex>
44 (field # 43) 13 UV Index <#UV>
45 (field # 44) 0.2 evapotranspiration today <#ET>
46 (field # 45) 14 solar radiation W/m2 <#SolarRad>
47 (field # 46) 260 10-minute average wind bearing (degrees) <#avgbearing>
48 (field # 47) 2.3 rainfall last hour <#rhour>
49 (field # 48) 3 The number of the current (Zambretti) forecast as per Strings.ini. <#forecastnumber>
50
(field # 49) 1 Flag to indicate that the location of the station is currently in daylight (1 = yes, 0 = No) <#isdaylight>
51 (field # 50) 1 If the station has lost contact with its remote sensors "Fine Offset only", a Flag number is given (1 = Yes, 0 = No) <#SensorContactLost>
52 (field # 51) NNW Average wind direction <#wdir>
53 (field # 52) 2040 Cloud base <#cloudbasevalue>
54 (field # 53) ft Cloud base units <#cloudbaseunit>
55 (field # 54) 12.3 Apparent temperature <#apptemp>
56 (field # 55) 11.1 Sunshine hours so far today <#SunshineHours>
57 (field # 56) 420.1 Current theoretical max solar radiation <#CurrentSolarMax>
58 (field # 57) 1 Is it sunny? 1 if the sun is shining, otherwise 0 (above or below threshold) <#IsSunny>
You can follow the existing logic and add these to $SITE['cvalues'] = array( ... OR you could simply refer to the array $DATA[#field number]
So your base image ....
Code: Select all
if($DATA[49] == 1) {
// OR if(ret_value("named field") == 1) {
$baseimg = imagecreatefromjpeg("images/clouds_banner.jpg"); // daytime image
} else {
$baseimg = imagecreatefromjpeg("images/clouds__night_banner.jpg"); //night-time image
}
You may need the same logic to alter text colours .....