Author Topic: php file  (Read 2201 times)

0 Members and 1 Guest are viewing this topic.

Offline Holm

  • Member
  • *
  • Posts: 4
php file
« on: August 05, 2017, 06:08:29 PM »
Dear Friends,

I´m new with this programm. Before I used cumulus but now I use an WH4000 station and this doesn`t work with cumulus.
So i will use weather display but I have a big problem.

I can set a lot of settings for uploading file to my website.
I found the connection and the upload works.

Now is the problem that I need an php-file with all relevant variables inside (temp, rain, wind  etc)
I have no plan how I can realize this.

I very happy with a replay form your site. Best way is an step by step instruction please.

Greeting Holm

Offline Jáchym

  • Meteotemplate Developer
  • Forecaster
  • *****
  • Posts: 8605
    • Meteotemplate
Re: php file
« Reply #1 on: August 05, 2017, 06:35:52 PM »
Hi Holm,

first of all welcome to the forum, I hope you enjoy it here, many very nice and helpful people here.

With regards to your question, I am afraid you will have to clarify a bit more what you are trying to achieve. Based on your description I do not understand what you are trying to do. What exactly are you trying to do? Do you want to use the default WD website templates? Do you have your own server and page? Do you want to send data somewhere else (WU)?

P.S. Try posting your questions always in the relevant thread and try to avoid duplicate posts

Best regards
Jachym

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: php file
« Reply #2 on: August 05, 2017, 07:00:00 PM »
There are at least two options for using Weather-Display with a PHP template set (Saratoga template with WD-plugin, Leuven template)

Saratoga templates at https://saratoga-weather.org/wxtemplates/index.php
Leuven templates at https://support.leuven-template.eu/download.php?lang=en

Weather-Display also includes the basic 'testtags.txt' template for a PHP weather variable file in its distribution.

It really depends on what you want -- just a variables file or a starter complete website template.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Holm

  • Member
  • *
  • Posts: 4
Re: php file
« Reply #3 on: August 08, 2017, 08:36:35 AM »
Thanks for your replay.

I´m not searching for a templete.
Now I get following file : wdfulldata.xml . This one I need as an ".php" file.
It is possible to get from WD?

Thanks for your replay.
Holm

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: php file
« Reply #4 on: August 08, 2017, 02:27:21 PM »
You do not have to use the full template, just the testtags.txt -> testtags.php which includes the majority used Weather-Display weather variables.

The wdfulldata.xml is an XML file, which you can convert to PHP variables by using the PHP function simplexml_load_file() but that is more complicated than just using the testtags.php from the template standalone.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Holm

  • Member
  • *
  • Posts: 4
Re: php file
« Reply #5 on: August 08, 2017, 04:43:42 PM »
Dear Saratoga,

I´m very sorry but I don`t have the file names "testtags.php" in any folder. Should I do an attitude in one of the hundred charts?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: php file
« Reply #6 on: August 08, 2017, 04:59:42 PM »
You can use the attached testtags.txt and these instructions to set up Weather-Display to read testtags.txt template, process it, and upload it as testtags.php to your website.

In your .php webpage needing the variables, just add (near the top of your page) the line
Code: [Select]
<?php include_once("testtags.php"); ?>
Then, in your page where you would like to print the temperature, just put
Code: [Select]
<?php print $temperature?>
You can look at testtags.php?sce=view on your website to see the variable names available and their current contents.

I hope this helps...
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Holm

  • Member
  • *
  • Posts: 4
Re: php file
« Reply #7 on: August 08, 2017, 05:15:59 PM »
Dear Friend,

wow amazing instructions.
I will check it tomorrow. In Gernay is it time to go sleeping ;-).
Thank you very much.

I will come back to you with a result.

 

anything