IMPORTANT! The server may go down soon - possibly permanently. Please read the latest post in Announcements and News

FTP is broken. I strongly advise all users using my server for their web site to make alternative arrangements.

Outgoing mail is disabled because of the malware on the server. No new forum registrations are currently possible, and mail to the forum administrator will not work.

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

UK Extremes from the MetOffice

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderators: daj, TNETWeather

User avatar
duke
Posts: 840
Joined: Sun Jul 03, 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby duke » Mon Mar 09, 2015 7:19 pm

mcrossley wrote:
duke wrote:Mark, just a thought, is it possible to store the selected region in a cookie so a returning visitor automatically sees their last choice? Presumably in most cases this would be the region they live in.
What, like this?: http://weather.wilmslowastro.com/test/t ... mes24h.php


Doesn't work for me, if I select London & SE from your drop down and then return to the page later it displays UK and not my London & SE.
Duke

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Mon Mar 09, 2015 7:48 pm

Cookies disabled? Which browser?

User avatar
duke
Posts: 840
Joined: Sun Jul 03, 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby duke » Mon Mar 09, 2015 9:08 pm

mcrossley wrote:Cookies disabled? Which browser?

Sorry Mark, ok, using WaterFox/FireFox with cookies enabled. I'm not even seeing a cookie for your site in the list. Also just tried with IE and Chrome with similar result.
Duke

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Mon Mar 09, 2015 9:23 pm

Odd, works in Chrome and IE for me on both my test page and my today/yesterday page...
Capture.PNG
You do not have the required permissions to view the files attached to this post.

colinpb
Posts: 86
Joined: Thu Nov 10, 2011 8:14 pm
Weather Station: VP2+SHT31+DFars+Solar+AeroCone
Operating System: Windows 10
Location: Hemel Hempstead, Hertfordshire, UK

Re: UK Extremes from the MetOffice

Postby colinpb » Mon Mar 09, 2015 9:40 pm

Firefox remembers for me (version 33.1.1. cookies enabled) My smart TV which uses linux and safari also remembers

Colin

User avatar
marfanuk
Posts: 43
Joined: Wed Nov 06, 2013 5:27 pm
Weather Station: Davis Vantage Vue
Operating System: Raspbian on the Raspberry Pi 2
Location: Nantwich, United Kingdom
Contact:

Re: UK Extremes from the MetOffice

Postby marfanuk » Tue Mar 10, 2015 12:45 pm

I've fiddled for ages to try and get the extremes script to work, but with no success.

Heres my link to the script - http://www.nantwich-weather.co.uk/ukExtremes24h.php

My settings -

Code: Select all

class ukExtremes24h {

    // Data Source
    private $urlBase = 'http://datapoint.metoffice.gov.uk/public/data/txt/wxobs/ukextremes/json/';
    private $apiKey = '2a7383b4-52a6-4c81-a0b8-77795464f1af';              // Your Met Office DataPoint API key
    private $cachePath = 'cache';   // Cache directory without trailing slash

    private $cacheFile = 'ukExtremes24h.json';              // Cache file name
    private $cacheTime  = 3600;                             // Cache expiration time Default: 3600 seconds = 1 Hour
    private $logging = true;                                // Logs information messages as comments in your HTML

    private $rawData = array();                             // Used internally to hold status and raw DataPoint data
    private $cache = 'cache';                                    // Used internally to hold full cache file name


also Mark met office weather forecast script is looking good, look forward to trying it.

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Tue Mar 10, 2015 4:51 pm

Hi Darren, nothing is being sent back to the browser, so you need to check the php error log on your server to see what is going on.

User avatar
duke
Posts: 840
Joined: Sun Jul 03, 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby duke » Tue Mar 10, 2015 7:15 pm

mcrossley wrote:Odd, works in Chrome and IE for me on both my test page and my today/yesterday page...


I have the cookie in Chrome and FireFox but it does not remember my choice.

wilm_cookie.png
You do not have the required permissions to view the files attached to this post.
Duke

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Tue Mar 10, 2015 8:44 pm

What are the cookie contents? It should just be the two character code for the selected region.

User avatar
marfanuk
Posts: 43
Joined: Wed Nov 06, 2013 5:27 pm
Weather Station: Davis Vantage Vue
Operating System: Raspbian on the Raspberry Pi 2
Location: Nantwich, United Kingdom
Contact:

Re: UK Extremes from the MetOffice

Postby marfanuk » Sat Apr 04, 2015 3:16 pm

mcrossley wrote:Hi Darren, nothing is being sent back to the browser, so you need to check the php error log on your server to see what is going on.


Hi Mark, bit of a delay in replying to You.

I've now got logging activated by my ISP and this is what i get back:

Code: Select all

88.104.86.206 - - [04/Apr/2015:16:06:08 +0100] "GET /ukExtremes24h.php HTTP/1.0" 200 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36"


It means nothing to Me. Any ideas?

http://www.nantwich-weather.co.uk/ukExtremes24h.php

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Sat Apr 04, 2015 3:29 pm

Hi Darren, it looks like that is the HTTP access log from the web server, you need the error log to see if anything is going wrong in PHP.

You can try adding the following lines to the top of the PHP script - just after the "<?php" line. The problem is they may not show anything if the script is failing to parse/compile for some reason.

Code: Select all

error_reporting(E_ALL);
ini_set('display_errors', '1');

forestedge
Posts: 47
Joined: Sun Jul 29, 2012 11:46 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows 10 64 bit
Location: Ashurst Bridge, Hampshire UK
Contact:

UK Extremes from the MetOffice cannot select.

Postby forestedge » Mon Sep 17, 2018 6:16 pm

I have the test script for UK extremes working for UK and region SE England here. http://www.tottonweather.co.uk/testUkExtremes24h.phpHowever when a region is selected from the dropdown box nothing happens!
This was the case with the original download.

Is some further coding needed here? Any help appreciated. :D

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Mon Sep 17, 2018 7:58 pm

Your page is missing the jquery script. It has...

Code: Select all

<script src="public_html/js/jquery.js" type="text/javascript"></script>


but jquery.js is not found on your server.

forestedge
Posts: 47
Joined: Sun Jul 29, 2012 11:46 am
Weather Station: Davis Vantage Pro2 Plus
Operating System: Windows 10 64 bit
Location: Ashurst Bridge, Hampshire UK
Contact:

Re: UK Extremes from the MetOffice

Postby forestedge » Mon Sep 17, 2018 9:48 pm

That's really odd because it is in there checking Filezilla. Here is a copy from the server
jquery.zip
You do not have the required permissions to view the files attached to this post.

User avatar
mcrossley
Posts: 5194
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: UK Extremes from the MetOffice

Postby mcrossley » Mon Sep 17, 2018 10:09 pm

I'm on my phone so can't easily check things, but I suspect you need to remove the "public_html" bit from the URL.


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 4 guests