rendered paste bodypreg_match('/<s>(.+)<\/s>/',$page, $windz); if(preg_match_all('/<\/d>\s*<t>(.+)<\/t>\s*<\/wind>/s',$page, $windd)) { $winddir = $windd[1][0]; switch($winddir) { CASE 'N': return 'North'; CASE 'S': return 'South'; CASE 'E': return 'East'; CASE 'W': return 'West'; CASE 'SW': return 'Southwest'; CASE 'SE': return 'Southeast'; CASE 'NW': return 'Northwest'; CASE 'NE': return 'Northeast'; CASE 'SSW': return 'South-Southwest'; CASE 'SSE': return 'South-Southeast'; CASE 'NNW': return 'North-Northwest'; CASE 'NNE': return 'North-Northeast'; CASE 'WNW': return 'West-Northwest'; CASE 'WSW': return 'West-Southwest'; CASE 'ENE': return 'East-Northeast'; CASE 'ESE': return 'East-Southeast'; } if($windz[1] != 'calm') { $wind = "$winddir at $windz[1] MPH"; } else { $wind = 'calm'; } } preg_match('/<hmid>(.+)<\/hmid>/',$page, $hmid); preg_match('/<ud>.<i>(.+)<\/i>.<t>(.+)<\/t>.<\/uv>/',$page, $uv); preg_match('/<r>(.+)<\/r>/',$page, $r); preg_match('/<d>(.+)<\/d>/',$page, $d); if($uv[1] > 2) { $uvi = ", UV Index: $uv[1] ($uv[2])"; } else { unset($uv); }