24 Hour Extremes World Weather Script

Thank you, that did it.

Michael,

Small problem with the new script. Fine and dandy that you have shortened the location names, but this is a bit much!! #-o

Would love to know where it happened, a little more accurately, not so general! :wink: #-o :lol:

George


Menubar.JPG

All,

Updated the menubar version:
(28-Nov-10) Version 0.4 – Improved shortened location and station removal setup
Download at first post.

Regards,
Michael

George,

I’ve updated the script so its back to the original long name by default and those who wish to shorten can do this by commenting out a line of code.

I had the code ignore everything before the comma, which left you with next to nothing! :lol:
http://www.ogimet.com/cgi-bin/gsynext?lang=en&state=Cana&rank=10&ano=2010&mes=11&day=28&hora=18&Send=send

Now it includes everything. If you wish to include everything leave the following two lines commented:


  //  $exLoc2[1] = preg_replace('|, .*|', '', $exLoc2[1]);    // get rid of everything in location after comma
  //  $exLoc2[1] = preg_replace('|.*, |', '', $exLoc2[1]);    // get rid of everything in location before comma

If you wish to remove everything before or after the “comma”, uncomment the proper line of the code by removing the “//”

Michael

Thanks! :wink:

George

Hi

Thanks for a great script. One question.

Is it possible to add the ability to remove unwanted stations from the output of the full Version?

Thanks

Rgds
Gert

Gert,

This was not built into the full version, sorry. Perhaps sometime in the future.

Michael

Michael thanks very much for your work!
i just got a problem with
Warning: fread() [function.fread]: Length parameter must be greater than 0 in /home/infomau/public_html/weer-mauritius/worldextremes.php on line 81
http://weer-mauritius.info-mauritius.com/mauritius-extreme.php

any idea?
best regards
stefan

Stefan,

Have you set your cache file to CHMOD 666?

Michael

Yes mth!

and it works now :lol:
did not change anything :oops:
thanks for this script!
regards
stefan

Stefan,

I’m glad you worked it all out!

Cheers!
Michael

Great script, Michael! Not to be greedy but… :oops: What are the chances of adding a form that allows visitors to select a previous date and view the records? I see Ogimet does this on their site (http://www.ogimet.com/ranking.phtml.en).

Thanks!

T

T,

I’m sure it can be done but this script uses a cache (suggested update time of 30-45 min.) which takes a lot of load off of the ogimet servers. To place a form would mean that the script would have to actively pull data for every previous date that is called in real-time. Additionally, this would mean a significant change in the script.

Michael

Ah, makes sense - wouldn’t want to blow up any servers! :wink:

T

All,

New version released for the Full Weather Extremes Script providing a drop down for use with multiple areas.
See example here: http://www.relayweather.com/wxworldextremes.php
Download in the first post.

Version History
(02-Dec-10) Version 0.5 – Added multi-area functionality (Thanks to Ray @ Tzouhalem-Maple Bay Weather www.tzweather.org !!)

Special thanks go to Ray at http://www.tzweather.org for his code contributions.

Cheers,
Michael

Hi Michael,

Love the script btw.

There is 18 synops on Ogimet for Ireland but only showing top 10 extremes using the previous full version of your script. How can I increase this so I can see all synops and not just top 10.

Have a temporary page set up atm.

http://www.irelandsweather.com/worldextremes.php

Many thanks,
Karl.

Thanks Michael!

Snowbie…upgrade to the latest version (version 0.5) and you can easily choose more stations by changing this to the amount you need.

// Number of stations to display
$stations           = 15;

If you don’t wish to update, as I see you are using version 0.4 you can change the following:

$siteSource = "http://www.ogimet.com/cgi-bin/gsynext?lang=en&state=$country&rank=10&ano=$year&mes=$month&day=$day&hora=$hour&Send=send";

to

$siteSource = "http://www.ogimet.com/cgi-bin/gsynext?lang=en&state=$country&rank=18&ano=$year&mes=$month&day=$day&hora=$hour&Send=send";

Notice the 18 added to the site source url.

Hi Michael,
great script.
I’ve insert it on my site here: http://www.meteocarmignano.it/wxitextremevalue.php

Many thanks,

Alessandro