Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
2 stations on same site
Moderator: daj
-
Per69
- Posts: 33
- Joined: Sat 07 Mar 2009 8:31 pm
- Weather Station: WH1081
- Operating System: Windows XP
- Location: Lidkoping, Sweden
- Contact:
2 stations on same site
Hej
Is it possible to send 2 cumuluswebtags.php to the same page.
As instructed in the top of coding you should have <?php
require_once("cumuluswebtags.php");?>
Can you stop the first php file after som rows and then continue with the other php file.
Should I rename the file so I have 2 different names?
/Per
Is it possible to send 2 cumuluswebtags.php to the same page.
As instructed in the top of coding you should have <?php
require_once("cumuluswebtags.php");?>
Can you stop the first php file after som rows and then continue with the other php file.
Should I rename the file so I have 2 different names?
/Per
-
gemini06720
- Posts: 1700
- Joined: Mon 10 Aug 2009 10:16 pm
- Weather Station: No weather station
- Operating System: No operating system
- Location: World...
Re: 2 stations on same site
Per, I do not think a file with the same name can be uploaded (FTP) to a host server without one overwriting the other one - you would need for each file to have its one name.
Could you please be a bit more informative as to what you are trying to accomplish...
Even the title to this thread is a bit confusing...
Could you please be a bit more informative as to what you are trying to accomplish...
Even the title to this thread is a bit confusing...
-
Per69
- Posts: 33
- Joined: Sat 07 Mar 2009 8:31 pm
- Weather Station: WH1081
- Operating System: Windows XP
- Location: Lidkoping, Sweden
- Contact:
Re: 2 stations on same site
Hej
I'm a kitesurfer and I support my surffriends with winddata primary from the spot where I live.
Now we got access to another spot with internet so we are going to setup station number 2 here.
Now we wan't data from these 2 spots to show on the same page on our webpage.
Yes I realized that I had to have 2 different names on the file.
But how can I call up tags from these two files?
How, where can I call up "require once" string?
/Per
I'm a kitesurfer and I support my surffriends with winddata primary from the spot where I live.
Now we got access to another spot with internet so we are going to setup station number 2 here.
Now we wan't data from these 2 spots to show on the same page on our webpage.
Yes I realized that I had to have 2 different names on the file.
But how can I call up tags from these two files?
How, where can I call up "require once" string?
/Per
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: 2 stations on same site
It's a little bit more awkward than that ....
cumuluswebtags.php is really just a list or variables which you then do your own thing with.
Changing the (duplicate) file name OR its location will make accessing the file easier BUT the variable names in each list are the same, so makes working with them on the same page difficult.
It would best to edit the second include file so the variable names were unique.
eg.
$time_2 =
$day_2 =
Now you can use each sites data without confusion
In a similar manner, if you are doing any math or comparrisons you would need to duplicate that bit of code with the _2 variables.
cumuluswebtags.php is really just a list or variables which you then do your own thing with.
Changing the (duplicate) file name OR its location will make accessing the file easier BUT the variable names in each list are the same, so makes working with them on the same page difficult.
It would best to edit the second include file so the variable names were unique.
eg.
$time_2 =
$day_2 =
Now you can use each sites data without confusion
In a similar manner, if you are doing any math or comparrisons you would need to duplicate that bit of code with the _2 variables.
......................Imagine, what you will KNOW tomorrow !
-
Per69
- Posts: 33
- Joined: Sat 07 Mar 2009 8:31 pm
- Weather Station: WH1081
- Operating System: Windows XP
- Location: Lidkoping, Sweden
- Contact:
Re: 2 stations on same site
Hej
Yes, of course, that make since.
But what about require once?
Can I have two rows in code that call up for example cumuluswebtags_1.php and cumuluswebtags.php?
Can require once be read twice?
/Per
Yes, of course, that make since.
But what about require once?
Can I have two rows in code that call up for example cumuluswebtags_1.php and cumuluswebtags.php?
Can require once be read twice?
/Per
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: 2 stations on same site
require_once() is just a way of 'including' other PHP files (and making sure each file only gets included once); so it's quite possible to do
<?php
require_once("cumuluswebtags_1.php");
require_once("cumuluswebtags.php");
?>
for example.
<?php
require_once("cumuluswebtags_1.php");
require_once("cumuluswebtags.php");
?>
for example.
Steve
-
Per69
- Posts: 33
- Joined: Sat 07 Mar 2009 8:31 pm
- Weather Station: WH1081
- Operating System: Windows XP
- Location: Lidkoping, Sweden
- Contact:
Re: 2 stations on same site
Hej
Thank you all for answering.
I think these answers makes it all.
I'll get right on to it.
/Per
Thank you all for answering.
I think these answers makes it all.
I'll get right on to it.
/Per
-
Per69
- Posts: 33
- Joined: Sat 07 Mar 2009 8:31 pm
- Weather Station: WH1081
- Operating System: Windows XP
- Location: Lidkoping, Sweden
- Contact:
Re: 2 stations on same site
I'm a little confused...beteljuice wrote:It would best to edit the second include file so the variable names were unique.eg. $time_2 = $day_2 =
In the cumuluswebtags.txt file I guess I should change like this?
$time = "<#time_2>"; // the current date and time (example format: 18:30 on 25 Dec 2009)
And i cumuluswebtags.php like this?
$time_2 = "22:26 on 30 juli 2011"; // the current date and time (example format: 18:30 on 25 Dec 2009)
/Per
- steve
- Cumulus Author
- Posts: 26672
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: 2 stations on same site
You need to change just the PHP variables (like $time), not the web tags (like <#time>); you can't invent web tags which don't exist; <#time_2> doesn't exist.Per69 wrote:In the cumuluswebtags.txt file I guess I should change like this?
$time = "<#time_2>"; // the current date and time (example format: 18:30 on 25 Dec 2009)
Steve
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: 2 stations on same site
To clarify ...
cumuluswebtags.php is simply the Cumulus processed and uploaded (renamed) cumuluswebtags.txt
So on the second station PC the uploaded (rename) file should be eg. cumuluswebtags_2.php
ALL the ($) variable names in the second station cumuluswebtags.txt should be changed to eg.
$time_2 = "<#time>";
Then in your main php page ..
require_once("cumuluswebtags.php");
require_once("cumuluswebtags_2.php");
cumuluswebtags.php is simply the Cumulus processed and uploaded (renamed) cumuluswebtags.txt
So on the second station PC the uploaded (rename) file should be eg. cumuluswebtags_2.php
ALL the ($) variable names in the second station cumuluswebtags.txt should be changed to eg.
$time_2 = "<#time>";
Then in your main php page ..
require_once("cumuluswebtags.php");
require_once("cumuluswebtags_2.php");
Last edited by beteljuice on Tue 02 Aug 2011 12:01 pm, edited 1 time in total.
......................Imagine, what you will KNOW tomorrow !
-
Per69
- Posts: 33
- Joined: Sat 07 Mar 2009 8:31 pm
- Weather Station: WH1081
- Operating System: Windows XP
- Location: Lidkoping, Sweden
- Contact:
Re: 2 stations on same site
Thanks!
No I'm clarified
/Per
No I'm clarified
/Per