Problem setting up meteoalarm page on website

I have just installed the meteoalarm.eu on my web page but when I go to my wx advisory page i get the following error message

Parse error: syntax error, unexpected '=' in /home/.sites/150/site462/web/get-meteoalarm-warning-inc.php on line 41
I think the offending line is the one below but I don't know how it should read. Any help much appreciated
$Lang.txt = "./meteoalarm-en.txt"; // prototype for path/filename for cache file // note: $EUAcacheName will be changed to -$Lang.txt (like -en.txt) to allow languages to have unique cache files.
Phil

I just did a upgrade to someones site and here is the portion in question from what you posted. Does your lool like that.

// create a 'meteoalarm-en.txt' file in the same directory as the script.
// you may have to set the permissions on the file to '666' so it is writable
// by the webserver.  Repeat for each language supported by your site.
//
$EUAcacheName = "./meteoalarm.txt";  // prototype for path/filename for cache file
// note: $EUAcacheName will be changed to -$Lang.txt (like -en.txt) to allow languages to have unique cache files.
//
$EUArefetchSeconds = 1800;  // refresh every hour
//
$EUAtarget  = '';  // set to 'target="_blank"' for links.. note: makes output not XHTML 1.0-Strict 
//$EUAtarget = 'target="_blank"';  // to launch links in new page .. not XHTML 1.0-Strict though 
// -------------End Settings -----------------------------
//
$EUAversion = 'get-meteoalarm-warning-inc.php V1.02 - 06-Oct-2008';
// the following note is required by agreement with the authors of the website www.meteoalarm.eu

Chuck

Chuck
Yes it is the same section, here is what it looks like on mine:

// create a 'meteoalarm-en.txt' file in the same directory as the script. // you may have to set the permissions on the file to '666' so it is writable // by the webserver. Repeat for each language supported by your site. // $Lang.txt = "./meteoalarm-en.txt"; // prototype for path/filename for cache file // note: $EUAcacheName will be changed to -$Lang.txt (like -en.txt) to allow languages to have unique cache files. // $EUArefetchSeconds = 3600; // refresh every hour // //$EUAtarget = ''; // set to 'target="_blank"' for links.. note: makes output not XHTML 1.0-Strict $EUAtarget = 'target="_blank"'; // to launch links in new page .. not XHTML 1.0-Strict though // -------------End Settings -----------------------------

Phil

The only thing I see different is this portion. Don’t know if that is the difference.

Mine;
$EUAcacheName = “./meteoalarm.txt”; // prototype for path/filename for cache file

Yours;
$Lang.txt = “./meteoalarm-en.txt”; // prototype for path/filename for cache file

Chuck

Chuck
Changed that line back. Which has got rid of the error but still not showing anything. Maybe I need to wait for next update?

When I click on your banner it goes to an older page that looks like WDL page and I am unable to open the page. You may want to change the url to

http://www.weybourneweather.co.uk/index.php

Chuck

Strange, it was workimg before but I haven’t clicked the banner for months. I have added wxadvisory.php link to flyout menu now. dierct link to page is
http://www.weybourneweather.co.uk/wxadvisory.php

Could you post your wxadvisory.php script so I can take a look at it.

Chuck

Here it is

<?php ############################################################################ # A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-World template set) ############################################################################ # # Project: Sample Included Website Design # Module: sample.php # Purpose: Sample Page # Authors: Kevin W. Reed # TNET Services, Inc. # # Copyright: (c) 1992-2007 Copyright TNET Services, Inc. ############################################################################ # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA ############################################################################ # This document uses Tab 4 Settings ############################################################################ require_once("Settings.php"); require_once("common.php"); ############################################################################ $TITLE= $SITE['organ'] . " - Watches/Warnings/Advisories"; $showGizmo = true; // set to false to exclude the gizmo include("top.php"); ############################################################################ ?> <?php ############################################################################ include("header.php"); ############################################################################ include("menubar.php"); ############################################################################ ?>
<?php if(isset($SITE['EUwarningURL'])) { include_once("get-meteoalarm-warning-inc.php"); // Use the EU Meteoalarm warning } else { // ------------------------------------------------------- // put your code for your regional weather warnings below this line ?>
  <h3>Watches, Warnings, and Advisories</h3> 
    
<div class="advisoryBox" style="text-align: left; background-color:#FFFF99">
Note: you'll need to find a link to your national watch/warn/advisory source.
</div>
<?php // end of put your code above this line // ------------------------------------------------------- } // end roll-your-own warnings ?>
<?php ############################################################################ include("footer.php"); ############################################################################ # End of Page ############################################################################ ?>

That looks okay. Sorry to be a pain but could you post this script, get-meteoalarm-warning-inc.php

Chuck

It’s no problem. Taking advantage of getting on computer before kids get home!!
Here is the script

[quote<?php
//Get regional alarm/warning from http://www.meteoalarm.eu/
// Script by Ken True - saratoga-weather.org
// Version 1.00 - 13-Sep-2008 - Initial Release
// Version 1.01 - 20-Sep-2008 - removed TZ setting (not used), added $EUAtarget option for links
// Version 1.02 - 06-Oct-2008 - some XHTML 1.0-Strict changes for

//
// error_reporting(E_ALL); // uncomment for error checking
//
// this script is designed to be used by
// include(“get-meteoalarm-warning-inc.php”);
//
// Find the warning area for your location by going to www.meteoalarm.eu
// Navigate to the warning area that represents your region and view the detail page for that area.
// For standalone script use,
// Copy the URL in the browser address bar into the $EUA_URL area as shown below.
//
// For Carterlake/WD/PHP template use, add to your Settings.php:
//
// $SITE[‘EUwarningURL’] = ‘<URL-to-use-on-meteoalarm.eu>’;
//
// where the <URL-to-use-on-meteoalarm.eu> is replaced by the URL in the browser address bar found
// by the method above. No other customization is needed in the script for use in the Carterlake/WD/PHP template.
//
// -------------Settings ---------------------------------
$Lang = ‘en’; // default language to be used (lowercase, must correspond to available
// template languages of
// ‘en’,‘ct’,‘de’,‘dk’,‘el’,‘es’,‘fi’,‘fr’,‘it’,‘nl’,‘no’,‘pl’,‘pt’,‘se’
//
//$EUA_URL = “http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=BE&area=33&areaname=”;
//$EUA_URL = “http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=ES&area=125&areaname=”;
//$EUA_URL = “http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=FR&area=320&areaname=Aveyron”;
//$EUA_URL = “http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=AT&area=7&areaname=K�rnten”;
$EUA_URL = “http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=GB&area=213&areaname=London%20&%20South%20East”;
//$EUA_URL = “http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=IE&area=163&areaname=”;
//
// create a ‘meteoalarm-en.txt’ file in the same directory as the script.
// you may have to set the permissions on the file to ‘666’ so it is writable
// by the webserver. Repeat for each language supported by your site.
//
$EUAcacheName = “./meteoalarm-en.txt”; // prototype for path/filename for cache file
// note: $EUAcacheName will be changed to -$Lang.txt (like -en.txt) to allow languages to have unique cache files.
//
$EUArefetchSeconds = 3600; // refresh every hour
//
$EUAtarget = ‘’; // set to ‘target=“_blank”’ for links… note: makes output not XHTML 1.0-Strict
//$EUAtarget = ‘target=“_blank”’; // to launch links in new page … not XHTML 1.0-Strict though
// -------------End Settings -----------------------------
//
$EUAversion = ‘get-meteoalarm-warning-inc.php V1.02 - 06-Oct-2008’;
// the following note is required by agreement with the authors of the website www.meteoalarm.eu
/* -----------------------------------------------------------------------------------------
Date: Thu, 11 Sep 2008 11:39:52 +0200
From: karin buchauer [email protected]
Organization: zamg

Dear Mr True,

you are quite right:
you can use the material featured on the website, without modifying it, providing the source (link) as well as time and date of issue of the data, as stipulated in the Terms & Conditions.

With best regards,
Karin Buchauer

Ken True schrieb:

Dear Sirs,

I am an amateur weather enthusiast who also writes scripting for other weather enthusiasts to incorporate weather data into their personal, non-commercial weather websites. Many of my scripts (which I write as a hobby, and are distributed gratis) are in use on personal weather websites worldwide.

I’ve had requests to package the excellent data from www.meteoalarm.eu for weather advisories in EU countries, and before I generate a script for that purpose, I’d like to have your permission to proceed.

Your Terms and Conditions page (http://www.meteoalarm.eu/terms.asp?lang=EN ) says:

"The material featured on this site is the common property of the Meteoalarm partners, and is subject to copyright protection.
The ownership and intellectual rights on all operational and updated awareness and warning information delivered to the Meteoalarm system remain with the Meteoalarm partners who originally delivered this information. The information on this web site may be used freely by the public.
Before using information obtained from this server special attention should be given to the date & time of the data and products being displayed.
In case this information is re-used: This information shall not be modified in content and the source of the information has always to be displayed as EUMETNET - MeteoAlarm, or if a single country, the providing national Institute (for internet application in all cases in the form of a link to: www.meteoalarm.eu). The time of issue at www.meteoalarm.eu must be count.

Third parties producing copyrighted works consisting predominantly of the material of this website must provide notice with such work(s) identifying the source of material incorporated and stating that such material is not subject to copyright protection. Further information can be obtained from this following address: [email protected]"

My reading of this implies that you do permit re-use/publishing of the information with attribution and an active link to the source page for the data on your site, and a note that the data is copyrighted by the data providing organization (and not subject to copyright by the 3rd-party website including/displaying the data). Is that correct?

Is it ok with you for me to generate a script for displaying national/regional weather alerts using your data from www.meteoalarm.eu with the appropriate attribution.

Please feel free to examine other scripts I’ve written which use NOAA, Environment Canada, US Geological Services, and temis.nl as data sources (http://saratoga-weather.org/scripts.php ).

Thank you in advance for your response,

Best regards,
Ken True
[email protected]
Saratoga, California, USA

Karin Buchauer
Assistant to the Project Manager EMMA

Zentralanstalt f

Check your Settings.php file and find this line and make sure it looks like this. It is about halfway down.

$SITE[‘EUwarningURL’] = ‘http://www.meteoalarm.eu/area.asp?lang=EN&ShowDate=&Country=GB&area=213&areaname=London%20&%20South%20East’;
// EUwarningURL is used by get-meteoalarm-warning-inc.php for EU countries

It has to match what is in your get-meteoalarm-warning-inc.php script.

Chuck

It Looks the same to me, Hers a copy of that line:

$SITE['EUwarningURL'] = '';

Chucks doesnt have these <> before and after the URL

The thing the page works. This is bura’s page http://www.meteoamstelveen.nl/wxadvisory.php . That is the way the settings are in the Settings.php file without the these (< >).

Chuck

Brilliant guys. Amazing what difference a couple of <>'s can make when you don’t understand code.

Many thanks
Phil :slight_smile:

I am glad it is working for you now.

Chuck