Meteoalarm script Modded by Henkka

Hi to all,
two months ago Henkka gave me the script in object.
I would insert it on my home page to show the meteo-alarm in a red rectangle box.
This script is a mod of the original script of Ken…it catches the data from site and paste the results wherever you want.
Unfortunately i’ve a problem with lang function that i don’t manage to fix.
Here is the link:

I didn’t see Henkka on this forum and he didn’t answer by email anymore so i would ask here if any php guru fix this little problem.
Thank you very much,


What’s on line 187and 375?


Line 187: if(($lang == “dk”) or ($lang == ‘’)) {

and line 375: if(($acva == true && $frontpage == true) || $frontpage == false) {

Thanks in advance for your support,


I’m not an expert (not even a newbe) :oops:

But it looks like there is something missing on line 187 if(($lang == “dk”) or ($lang == ‘’)) {

should it not be something like this, if(($lang == “dk”) or ($lang == ‘’")) {

I think the problem is that the script is expecting $lang to have been defined before that line. Can you save the whole script as .txt and attach or post it?

(php can usually accept either single ’ or double quotes ", there is a subtle difference, but it’s not usually critical.)

Hi Niko,
here it is :smiley:


meteo.php.txt (23.1 KB)

Alessandro, line 187 fails because there is a mix of $Lang and $lang being used in the script. Variable names are case sensitive so $Lang is not the same as $lang. I suggest you replace all the $lang with $Lang and see if it runs for you.

Also on line 28 remove the spaces before $Lang.

Many thanks Niko…but now i’ve others errors:

Notice: Undefined offset: 0 in /web/htdocs/ on line 329

Notice: Undefined offset: 1 in /web/htdocs/ on line 336

Notice: Undefined variable: acva in /web/htdocs/ on line 375

:? :?

Any ideas?


I don’t get any errors so maybe you have a typo. I don’t get any output either but there are no alarms for IT so maybe that’s OK. I’ve attached my code.

Update: It’s alive :smiley: I had to uncomment line 378

print “$EUAwarning”;

There’s still something wrong with the file caching that I haven’t fixed, but it’ll work if you force it to read the website so that’s progress:

meteo.php.txt (23.1 KB)

Thanks Niko!
You’ve fixed all errors :smiley:

Last thing: Now, this script shows “Non e’ richiesta alcuna attenzione speciale” because there isn’t any alarm on italy.

But if i include the script like so:

$frontpage = true;
include 'meteo.php';
echo $requiredNoteEUA;

it doesn’t show anything in the orange box…why?

It should showing the results of script…“Non e’ richiesta alcuna attenzione speciale”. Isn’ t it?
Thanks again,


Hi Alessandro,

Very good script.
Can you send me?
Thank you very much.

Hi Alessandro,
Try this version.

meteo.php.txt (18.8 KB)

WOW! :smiley:
Very nice Kartal…thank you very much!!
Which are the differences?

It remains one issue.
I don’t still manage to include meteo.php on my home page.
Look here:

I’ve put this code

$frontpage = true;
include_once 'meteo.php';
echo $requiredNoteEUA;

on that page but without success.
How have you done?



Please wait while working on it :smiley:

Hi Alessandro,

<?php $frontpage = true; include_once 'meteo.php'; echo $EUAwarning; ?>

Bingo! :smiley:
Now it works without any issue…i’ll wait my first advice to test it.

Thank you very much (Niko and Kartal), :slight_smile: :slight_smile:


I’m glad you managed to do it :multi: :smiley:

I made a special version of the character as well.
Utf-8, ISO 8859-2, ISO 8859-1

meteo.php.txt (20.8 KB)

Thanks again Kartal,
i’ll try it tonight.


Hi Kartal :smiley:
i’ve tried your version but i don’t found any differences as well as others characters.
Please, could you tell me which differences are there?
Many thanks,


Hi Alessandro,

The Hungarian characters