} if ($geoid) { $args .= '&geoid=' . $geoid . $p; } else { $args .= '&lat=' . $centerlat . '&lon=' . $centerlon . $p; } $ewnargs = '&user=true&wsp=' . $wunit . '&datestyle=' . $datestyle . '&v=' . $version . '&mobile=' . $is_mobile . '&key=' . $scrambled; //if($_GET[lat]||$_GET[geoid]){ $frcdata = frccurl("http://www.europeanweathernetwork.eu/frc/data_php.php" . $args . $ewnargs); $frcdata = json_decode($frcdata, true); $centerlat = $frcdata[plat]; $centerlon = $frcdata[plon]; //} } $tzdiff = date("Z") * 1000; $times = frccurl("http://a.maps.nordicweather.net/maptime_e.php?tz=" . $tzabb . "&du=" . time()); $data = json_decode($times, true); foreach ($days as $key => $value) { $da[] = utf8_encode($value); } $js_array = json_encode($da); $ewnhead = ' <link rel="stylesheet" href="http://static.nordicweather.net/css/ol2.css" /> <link rel="stylesheet" href="' . $path_to_css . 'wrf_s.css?' . $version . '" />'; if ($jqueryload) { $ewnfooter .= ' <script src="http://static.nordicweather.net/jq/jquery-1.8.2.min.js"></script> <script src="http://static.nordicweather.net/jq/bootstrap_jq.min.js"></script>'; } $ewnfooter .= ' <script src="http://static.nordicweather.net/jq/OpenLayersLite.js"></script>
$lang = "da"; $oldlang = "dk"; } include 'ewn/ewn.lang.' . $lang . '.php'; # Your personal API-key, get it from EWN member-area. Required from 2015-01-01. $apikey = ""; $scrollwheel = 1; // Scrollwheel zoom? 1 = yes, 0 = no $centerlat = $SITE['latitude']; // Centerlatitude of the map $centerlon = $SITE['longitude']; // Centerlongitude of the map $deflevel = 5; // Deafult zoomlevel of the map, 3-9 $basemap = "sat"; $scrambled = frccurl("http://www.europeanweathernetwork.eu/frc/key.php?k=" . $apikey); $ewnhead = ' <link rel="stylesheet" href="http://esri.nordicweather.net/3.6/3.6compact/js/esri/css/esri.css" /> <link rel="stylesheet" href="ewn/ewn_style.css" /> <script src="http://static.nordicweather.net/jq/jquery-1.8.2.min.js"></script> <script src="http://static.nordicweather.net/jq/bootstrap_jq.min.js"></script> <script src="http://static.nordicweather.net/jq/jquery.tablesorter.js"></script> <script src="http://static.nordicweather.net/jq/highstock.js"></script> <script>var dojoConfig = { paths: {es: location.pathname.replace(location.pathname, "http://static.nordicweather.net/jq")}};</script> <script src="http://esri.nordicweather.net/3.6/3.6compact/init.js"></script> '; $ewndata = ' <div id="ewnwrapper"> <div id="ewnnav"> <span style="float:right"> <label>
<head> <link rel="stylesheet" href="http://www.europeanweathernetwork.eu/css/wrf_s.css" /> <script src="http://static.nordicweather.net/jq/jquery-1.8.2.min.js"></script> </head> <body> <?php $lat = 60.45042; $lon = 23.23714; $howmany = 6; $windunit = "m/s"; $lang = "fi"; // Remove if your site has it defined allready $topfrc = frccurl("http://www.europeanweathernetwork.eu/frc/data_short.php?lat={$lat}&lon={$lon}&howmany={$howmany}&windunit={$windunit}&lang={$lang}"); echo $topfrc; function frccurl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120424 Firefox/12.0 PaleMoon/12.0'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 2); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); $response = curl_exec($ch); curl_close($ch); return $response; } ?> </body>