OK, then try this:
<?php
############################################################################
#
# Meteotemplate
# http://www.meteotemplate.com
# Free website template for weather enthusiasts
# Author: Jachym
# Brno, Czech Republic
# First release: 2015
#
############################################################################
#
# Global snow
#
# A plugin showing current snow and ice around the world.
#
############################################################################
# Version and change log
#
# v1.0 2015-10-30 Initial release
#
############################################################################
include("../../config.php");
include($baseURL."css/design.php");
include($baseURL."header.php");
if(file_exists("lang/".$lang.".php")){
include("lang/".$lang.".php");
}
include("lang/gb.php");
// Western Arctic
$url = curl_get_contents2("http://ice-glaces.ec.gc.ca/cgi-bin/getprod.pl?prodid=IPYMMR1WA&wrap=1&lang=en");
$output = str_replace(array("\r\n", "\r"), "\n", $url);
$lines = explode("\n", $output);
$new_lines = array();
foreach ($lines as $i => $line) {
if(!empty($line))
$new_lines[] = trim($line);
}
$url = implode($new_lines);
preg_match('/<div class="col-xs-12"><img src="(.*?).gif/',$url,$matches);
$westernArctic = "http://ice-glaces.ec.gc.ca".$matches[1].".gif";
// Eastern Arctic
$url = curl_get_contents2("http://ice-glaces.ec.gc.ca/cgi-bin/getprod.pl?prodid=IPYMMR1EA&wrap=1&lang=en");
$output = str_replace(array("\r\n", "\r"), "\n", $url);
$lines = explode("\n", $output);
$new_lines = array();
foreach ($lines as $i => $line) {
if(!empty($line))
$new_lines[] = trim($line);
}
$url = implode($new_lines);
preg_match('/<div class="col-xs-12"><img src="(.*?).gif/',$url,$matches);
$easternArctic = "http://ice-glaces.ec.gc.ca".$matches[1].".gif";
// Hudson Bay
$url = curl_get_contents2("http://ice-glaces.ec.gc.ca/cgi-bin/getprod.pl?prodid=IPYMMR1HB&wrap=1&lang=en");
$output = str_replace(array("\r\n", "\r"), "\n", $url);
$lines = explode("\n", $output);
$new_lines = array();
foreach ($lines as $i => $line) {
if(!empty($line))
$new_lines[] = trim($line);
}
$url = implode($new_lines);
preg_match('/<div class="col-xs-12"><img src="(.*?).gif/',$url,$matches);
$hudsonBay = "http://ice-glaces.ec.gc.ca".$matches[1].".gif";
// Composite
$url = curl_get_contents2("http://ice-glaces.ec.gc.ca/cgi-bin/getprod.pl?prodid=MODISCOM-F&wrap=1&lang=en");
$output = str_replace(array("\r\n", "\r"), "\n", $url);
$lines = explode("\n", $output);
$new_lines = array();
foreach ($lines as $i => $line) {
if(!empty($line))
$new_lines[] = trim($line);
}
$url = implode($new_lines);
preg_match('/<div class="col-xs-12"><img src="(.*?).jpg/',$url,$matches);
$composite = "http://ice-glaces.ec.gc.ca".$matches[1].".jpg";
function curl_get_contents2($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; rv:19.0) Gecko/20100101 Firefox/19.0");
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Snow - Canada</title>
<?php metaHeader()?>
<style>
#wrapper, #wrapper2{
position: relative;
margin: 0 auto;
width: 100%;
text-align: center;
height: 500px;
}
.overlay, .overlay2{
position: absolute;
top: 0px;
left: 0px;
right: 0px;
margin: auto;
height: 500px;
}
.heading_bar{
background: #<?php echo $color_schemes[$design2]['900']?>;
color: #<?php echo $color_schemes[$design2]['font900']?>;
}
.content{
background: #<?php echo $color_schemes[$design2]['200']?>;
color: #<?php echo $color_schemes[$design2]['font200']?>;
}
</style>
</head>
<body>
<div id="main_top">
<?php bodyHeader()?>
<?php include($baseURL."menu.php")?>
</div>
<div id="main" style="text-align:center">
<div style="width:98%;margin:0 auto">
<img src="<?php echo $pageURL.$path?>imgs/flags/big/ca.png" style="width:100px" alt="">
<br>
<p class="heading_bar"><?php echo lang('Ice in water','c')?></p>
<div class="content">
<img src="http://ice.ec.gc.ca/Ice_Can/CMMBCTCA.gif" style="width:75%;display:block;margin:0 auto" alt="">
</div>
<p class="heading_bar"><?php echo lang('Western Arctic','c')?></p>
<div class="content">
<img src="<?php echo $westernArctic?>" style="width:75%;display:block;margin:0 auto" alt="">
</div>
<p class="heading_bar"><?php echo lang('Eastern Arctic','c')?></p>
<div class="content">
<img src="<?php echo $easternArctic?>" style="width:75%;display:block;margin:0 auto" alt="">
</div>
<p class="heading_bar"><?php echo lang('Hudson Bay','c')?></p>
<div class="content">
<img src="<?php echo $hudsonBay?>" style="width:75%;display:block;margin:0 auto" alt="">
</div>
<p class="heading_bar"><?php echo lang('Composite','c')?></p>
<div class="content">
<img src="<?php echo $composite?>" style="width:75%;display:block;margin:0 auto" alt="">
</div>
<br>
<?php echo lang('Data source','c')?>: Environment Canada
</div>
</div>
<?php include($baseURL."footer.php")?>
<script>
$(".content").hide();
$(".heading_bar").click(function(){
$(this).next(".content").slideToggle(800);
});
</script>
</body>
</html>