How to have the [actual_localdate2] in my web page ?
Moderator: Mattk
How to have the [actual_localdate2] in my web page ?
I need to have the [actual_localdate2] in my web page Index.html, how to do it ?
- YJB
- Platinum Boarder

- Posts: 387
- Joined: Thu Feb 19, 2009 5:53 pm
- Location: Venhuizen, Netherlands
- Contact:
Re:How to have the [actual_localdate2] in my web page ?
<Sorry about he mess, not sure how to get this right in fireboard>
Hi,
There are many ways to do this, but this is one to get you going:
[ This assumes that you did configure meteohubs' push services already]
Step 1:
create the following file on your meteohub
This is not really a html file, but meteohub will need to know that this is a special file. Alternatively you could create the entire index.html on meteohub, but you probably want to put more in it.
Step 2:
a) In your meteohub GUI go to graph uploads
b) Select the file you just created
c) Select an upload schedule
d) Select the name of the file once it lands on your web server (this could be the same name)
Step 3:
On your web server include the uploaded file in your HTML, one way could be a shtml that contains:
By the way, in this case, if you just want to display the local date, you don't need meteohub at all, just include the following:
You can include both of them on the same page, it will show you when the page was generated and the time meteohub uploaded the file to your webserver.
HTH
This is the complete webpage on the server in this case:
<>
Hi,
There are many ways to do this, but this is one to get you going:
[ This assumes that you did configure meteohubs' push services already]
Step 1:
create the following file on your meteohub
Code: Select all
meteoplug:/data/graphs# cat /data/graphs/test1.html
"[actual_localdate2]"
Step 2:
a) In your meteohub GUI go to graph uploads
b) Select the file you just created
c) Select an upload schedule
d) Select the name of the file once it lands on your web server (this could be the same name)
Step 3:
On your web server include the uploaded file in your HTML, one way could be a shtml that contains:
Code: Select all
<!--#include virtual=./<upload directory>/test1.html -->
Code: Select all
[b]Local time is <!--#echo var="DATE_LOCAL" -->.[/b]
HTH
This is the complete webpage on the server in this case:
Code: Select all
[v120] /data/www/default # cat test1.shtml
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
Welcome....
<br>
<strong>
Local time is <!--#echo var="DATE_LOCAL" -->.
</strong>
<br>
<!--#include virtual=./weather_vars/test1.html -->
</body>
</html>
