Hi Folks
I am using a risk assessment script for WXSim and i want to have cold temps show, currently it only
shows windchill (amongst others)
I have modified this bit of code of which is for the windchill part
$chll = 100;
$wcpos = strpos($pdvb, 'Wind chill down to ');
if ($wcpos !== false) {
$chll = substr($pdvb, $wcpos + 19, strpos($pdvb, '. ', $wcpos) - $wcpos - 19);
if ($chll <= $wcpreset) {
$wcstate .= "".$pdnm." expect wind chills dropping to ".$chll."C. The ".$pdtv." temperature will be ".$maxmin."C.";
$wcstate .= '<br><br>';
}
}
but sadly its not working, heres what i have done
$tmp = 100;
$tmppos = strpos($pdvb, 'low ');
if ($tmppos !== false) {
$tmp = substr($pdvb, $tmppos + 19, strpos($pdvb, '. ', $tmppos) - $tmppos - 19);
if ($tmp <= $tmppreset) {
$tpstate .= "".$pdnm." The ".$pdtv." temperature will be ".$maxmin."C.";
$tpstate .= '<br><br>';
}
}
The problem i am having is its not showing anything when i have set the settings so it would
show, i have a strange feeling its something to do with the number 19, i have not got a clue
what any of the numbers for the other sections (i.e. snow, thunder and so on) mean and i have
been trying to figure them out to no avail!
Does anyone have any ideas please as i am at a loss at present, i thought it would have worked
and cannot see why it wont other than the number 19, it must have a bearing on the whole game!