Yes, you did  understand correctly. I am not an expert html programmer but
if my understanding is correct, using curl needs php at the backend. The
embedded linux has php package but I am being told not to enable that. I am
using mongoose version 4 and I am looking a solution that will silently
execute the date linux command at the backend upon loading the index.html.

What I am implementing now is using javascript to generate the time format
as follow.
+<script type="text/javascript">
+function getClientDateTime()
+{
+   var digital = new Date();
+   var hours = digital.getHours();
+   var minutes = digital.getMinutes();
+   var seconds = digital.getSeconds();
+   if (minutes <= 9) minutes = "0" + minutes;
+   if (seconds <= 9) seconds = "0" + seconds;
+   dispTime = hours + ":" + minutes + ":" + seconds;
+
+   var date = ((digital.getDate() < 10) ? "0" : "") + digital.getDate();
+   var year = (digital.getYear() < 1000) ? digital.getYear() + 1900 :
digital.getYear();
+   today = year +"-"+(digital.getMonth()+1)+"-"+digital.getDay();
+   serverTime = today+" "+dispTime;
+
+   return serverTime;
+}
+</script>

if I implement it in SSI, how can I pass the return value of
getClientDateTime() to SSI? I am kinda looking of a solution  <!--#exec
"date --set getClientDateTime()" -->

Thanks and hoping for your understanding regarding the solution that I am
looking for.


On Fri, Jan 10, 2014 at 6:06 PM, Sergey Lyubka <[email protected]> wrote:

> You want to pass an information (current time) from client to server, the
> best way it to pass it in URI. For example, using curl, you can do:
>
> curl http://my_server/foo?my_info=bar
>
> Did I understand you correctly?
>
> SSI support has been removed since 5.0, the reason is that mongoose has
> way more
> powerful scripting capabilities with Lua.
>
>
> On Fri, Jan 10, 2014 at 2:41 PM, yana <[email protected]> wrote:
>
>> Hello,
>>
>> I am just new to mongoose and amazed with this very light server. I have
>> setup the mongoose on the embedded arm hardware connected to the network
>> and it works fine. :-) I can access the server from the client computer
>> through web browser.
>>
>> Now I would like to send the current client local time to the server
>> using SSI. I played around  <!--#exec "date --set '2014-01-10
>> 11:13:13"--> and works ok but the date is hardcoded. I have read the
>> mongoose manual and say only the following SSI are supported.
>>
>>
>>    - <!--#exec "shell command"--> Execute shell command.
>>
>>
>>      o        <!--#include "path"--> File path must be relative to the 
>> current doc-
>>       ument.
>>
>>      o        <!--#include virtual="path"--> File path must be relative to 
>> the doc-
>>       ument root.
>>
>>      o        <!--#include file="path"--> File path must be the absolute 
>> path.
>>
>>
>> Is there anyway way that we could get the client current time using SSI
>> tag? and pass it to exec tag such way the server will sync with the client
>> time?
>>
>> Best Regards,
>> Ian
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "mongoose-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/mongoose-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "mongoose-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/mongoose-users/y1_OuXl01lc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/mongoose-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Mit den besten Grüßen,
ian

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to