Snow Report

xpath("/DATAFILE"); $obs = $xml->xpath("/DATAFILE/SITE/OBS"); } $xml2 = @simplexml_load_file("http://us4.resorts-interactive.com/vicomap/getWeatherReport.php?mapID=1112", 'SimpleXMLElement', LIBXML_NOCDATA); $com = $xml2->xpath("/COMMENTS"); if ($xml2 && $xml2->points) { $snowreport = $xml2->points[0]->point[0]->report[0]->attributes(); $comment = (string) $xml2->overAll[0]->comments; } $feed = @simplexml_load_file("http://us4.resorts-interactive.com/vicomap/getMapDetails.php?mapID=1112", 'SimpleXMLElement', LIBXML_NOCDATA) ?>

Current Conditions

<?php echo $obs[0]->attributes()->FORECAST_TEXT_EN ?> attributes()->TEMPERATURE_C ?>°
attributes()->FORECAST_TEXT_EN ?>.
Recorded at attributes()->GENTIME ?>

  • Temperature attributes()->TEMPERATURE_C ?>°
  • 24-hour Snowfall snowfall24; ?>
  • Season Snowfall snowfallSeason; ?>
  • Snow Base base; ?>
  • Surface Conditions surfaceConditions; ?>

Terrain Areas

    plugin && $feed->plugin->terrainAreas) { foreach($feed->plugin->terrainAreas->area as $area) { $status_text = $area->attributes()->status; preg_match('/^0x([0-9A-Fa-f]+)$/',$area->attributes()->statusColour,$matches); if ( $matches[1] == 'FF0000') { $status_color = '#d44541'; } else { $status_color = '#'.$matches[1]; } $area_heading = $area->attributes()->heading; $html_desc = html_entity_decode(str_replace(''', '’', $area->attributes()->description)); echo "
  • "; echo "

    ".$area_heading; if ($status_text>'') { echo "".$status_text.""; } echo "

    "; echo ""; if(preg_match_all("/(.*?)<\/FONT>/",$html_desc,$matches)) { foreach($matches[2] as $line) { if(!empty($line)) { echo t(trim($line)." "); } } } echo ""; echo "

  • "; } } ?>

Lifts

    plugin && $feed->plugin->lifts) { foreach($feed->plugin->lifts->lift as $lift) { $status_text = $lift->attributes()->status; preg_match('/^0x([0-9A-Fa-f]+)$/',$lift->attributes()->statusColour,$matches); if ( $matches[1] == 'FF0000') { $status_color = '#d44541'; } else { $status_color = '#'.$matches[1]; } $lift_heading = $lift->attributes()->heading; $html_desc = html_entity_decode(str_replace(''', '’', $lift->attributes()->description)); echo "
  • "; echo "

    ".$lift_heading; echo "".$status_text."

    "; echo ""; if(preg_match_all("/(.*?)<\/FONT>/",$html_desc,$matches)) { foreach($matches[2] as $line) { if(!empty($line)) { echo t(trim($line)." "); } } } echo ""; echo "

  • "; } } ?>

Trails

    plugin && $feed->plugin->trails) { //parse through lifts and extract text and status foreach($feed->plugin->trails->trail as $trail) { $status_text = trim($trail->attributes()->status); if(!empty($status_text)) { preg_match('/^0x([0-9A-Fa-f]+)$/',$trail->attributes()->statusColour,$matches); if ( $matches[1] == 'FF0000') { $status_color = '#d44541'; } else { $status_color = '#'.$matches[1]; } $trail_heading = $trail->attributes()->heading; switch(strtolower($trail->attributes()->difficulty)) { case "novice"; $trail_difficulty = "Novice"; break; case "intermediate"; $trail_difficulty = "Intermediate"; break; case "advanced"; $trail_difficulty = "Advanced"; break; default: $trail_difficulty = $trail->attributes()->difficulty; } $trail_snowmaking = $trail->attributes()->snowMaking == "1" ? "SNOW MAKING" : ""; $trail_groomed = $trail->attributes()->groomed == "1" ? "GROOMED" : ""; $html_desc = html_entity_decode(str_replace(''', '’', $trail->attributes()->description)); echo "
  • "; echo "

    ".$trail_heading; echo " – ".$trail_difficulty.""; //echo ""; echo "".$status_text; if(!empty($trail_snowmaking)) { echo "".$trail_snowmaking.""; } if(!empty($trail_groomed)) { echo "".$trail_groomed.""; } echo ""; echo "

    "; if(preg_match_all("/(.*?)<\/FONT>/",$html_desc,$matches)) { foreach($matches[2] as $line) { if(!empty($line)) { echo t(trim($line)." "); } } } echo ""; echo "

  • "; } } } ?>