Re: Getting user's time from web revlet?
Mark Wieder wrote: the user's info. But if you're using a revlet (and that *is* in the subject, after all) then you should be able to convert the server's internet time to the user's local time (assuming the local time on their computer is correct). Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Someone mentioned cookies, which seems like a logical method -- now to learn how to make and read cookies! Tim Selander Tokyo, Japan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
On 21.01.10 at 21:56 +0900 Tim Selander apparently wrote: Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Someone mentioned cookies, which seems like a logical method -- now to learn how to make and read cookies! Tim Selander Tokyo, Japan Are your family members login in in any way? Presumably there is some access protection. If so, time zone could be part of the user account data. You would not care then what time user computer has (and whether it is set correctly). Robert ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robelko.com wrote: On 21.01.10 at 21:56 +0900 Tim Selander apparently wrote: Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Someone mentioned cookies, which seems like a logical method -- now to learn how to make and read cookies! Tim Selander Tokyo, Japan Are your family members login in in any way? Presumably there is some access protection. If so, time zone could be part of the user account data. You would not care then what time user computer has (and whether it is set correctly). Robert ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
I agree that with On-Rev using irev scripts, the HTTP headers is a definite weakness. However, the On-Rev server account features that we have now allow for Rev CGI, which has the same header limitations, but stable code and capabilities PHP which does have the full range of header access/control and the blending of userPage.php calling cgi and irev scripts (plus the cgi opening and using Rev stacks). Remote servers can run both php and rev cgi, and call irev scripts to process data and return info. My plans are to continue using all these tools with the foundational goal of writing code that will work well into the future. This means mostly Rev cgi, with php, and very little irev scripting until we are beyond beta. I am integrating assets located on several servers, so reliability is crucial. Jim Ault Las Vegas On Jan 21, 2010, at 8:14 AM, Andre Garzia wrote: I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robelko.com wrote: On 21.01.10 at 21:56 +0900 Tim Selander apparently wrote: Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Someone mentioned cookies, which seems like a logical method -- now to learn how to make and read cookies! Tim Selander Tokyo, Japan Are your family members login in in any way? Presumably there is some access protection. If so, time zone could be part of the user account data. You would not care then what time user computer has (and whether it is set correctly). Robert ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
A few months back Mark Waddingham had an article in RevUp describing how to use a shell script to get the user's local time. If you knew where each user was located it might be a solution. http://runrev.com/newsletter/may/issue71/newsletter2.php Devin On Jan 21, 2010, at 9:14 AM, Andre Garzia wrote: I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robelko.com wrote: On 21.01.10 at 21:56 +0900 Tim Selander apparently wrote: Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Devin Asay Humanities Technology and Research Support Center Brigham Young University ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Hi Andre and All, Google Analytics use js+cookies to handle all the user's local dates tasks. Seems to meen that revServer is not the onest server-side engine to passtrough some env_vars ;-) HTH, Pierre Le 21 janv. 10 à 17:14, Andre Garzia a écrit : I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robelko.com wrote: On 21.01.10 at 21:56 +0900 Tim Selander apparently wrote: Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Someone mentioned cookies, which seems like a logical method -- now to learn how to make and read cookies! Tim Selander Tokyo, Japan Are your family members login in in any way? Presumably there is some access protection. If so, time zone could be part of the user account data. You would not care then what time user computer has (and whether it is set correctly). Robert ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- Pierre Sahores mobile : (33) 6 03 95 77 70 www.wrds.com www.sahores-conseil.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
If I were determined to make use of an irev script with an HTTP header that was unsupported by the irev engine, I could create a userPage.php page that captured the header string(s) then called the irev script passing the params. This address could be myaccount.on-rev.com/userPage.php I might use this to enhance the Rev cgi 3.5 Linux capabilities to use custom headers. It won't work in reverse since every one of the (HTTP header data strings) needs to arrive in a php script. so these would not do the trick myaccount.on-rev.com/userPage.cgi myaccount.on-rev.com/userPage.irev Jim Ault Las Vegas On Jan 21, 2010, at 8:14 AM, Andre Garzia wrote: I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robelko.com wrote: On 21.01.10 at 21:56 +0900 Tim Selander apparently wrote: Hi Mark - yep, that is exactly what I want to do, but haven't figured out how yet. I have learned how to get the user's local time via javascript, but don't know how to pass it to the revlet (actually, it seems I have my terms wrong, typical for a newbie... I'm trying to script this all in an .irev file on my on-rev account.) Someone mentioned cookies, which seems like a logical method -- now to learn how to make and read cookies! Tim Selander Tokyo, Japan Are your family members login in in any way? Presumably there is some access protection. If so, time zone could be part of the user account data. You would not care then what time user computer has (and whether it is set correctly). Robert ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
On Jan 21, 2010, at 9:08 AM, Pierre Sahores wrote: Hi Andre and All, Google Analytics use js+cookies to handle all the user's local dates tasks. Seems to meen that revServer is not the onest server-side engine to passtrough some env_vars ;-) True, but that again is using cookies in the traditional way, as long as the user allows cookies. The web page author programs using some code that reads/writes cookies (data to the user hard drive), thus the server tries to use cookies, and the user can set limits or disallow their use. Many corporations disallow. Jim Ault Las Vegas Le 21 janv. 10 à 17:14, Andre Garzia a écrit : I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robe ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Jim, in this case, Sarah's way wins and David Beck's CallPHP 1.5 lib sould be usable too (http://www.rotundasoftware.com/rev/) Le 21 janv. 10 à 03:04, Sarah Reichelt a écrit : On Wed, Jan 20, 2010 at 12:29 AM, Tim Selander selan...@tkf.att.ne.jp wrote: Thanks for clearing up the .irev/revlet confusion in my head. I've read through the thread a couple times... and it seems you CANNOT get the user/browser's date and time through RevServer scripts. Correct? Anyone have a javascript snippet they like to use to get the user's date and time? thanks. As far as I know, the JavaScript Date object gives the browser's date time. Here is a routine I have to showing a time stamp: function showTimeStamp() { // show the current date time in the divider bar var date = new Date(); var m = date.getMinutes(); var s = date.getSeconds(); // add a zero in front of numbers 10 if (m 10) { m = 0 + m; } if (s 10) { s = 0 + s; } // format into d/m/h:mm:ss var currentDate = date.getDate() + / + (date.getMonth() + 1) + / + date.getFullYear() + + date.getHours() + : + m + : + s; $('#timestamp').text(Last step: + currentDate); } The last line uses jQuery to display the time stamp in the tag with the id timestamp, but you can also use straight JavaScript: document.getElementById(timestamp).innerHTML = currentDate; Note that I have the date formatted in the English/Australian style (d/m/y), so swap the segments around if you want American dates. HTH, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution Le 21 janv. 10 à 18:28, Jim Ault a écrit : On Jan 21, 2010, at 9:08 AM, Pierre Sahores wrote: Hi Andre and All, Google Analytics use js+cookies to handle all the user's local dates tasks. Seems to meen that revServer is not the onest server- side engine to passtrough some env_vars ;-) True, but that again is using cookies in the traditional way, as long as the user allows cookies. The web page author programs using some code that reads/writes cookies (data to the user hard drive), thus the server tries to use cookies, and the user can set limits or disallow their use. Many corporations disallow. Jim Ault Las Vegas Le 21 janv. 10 à 17:14, Andre Garzia a écrit : I think the important part of this thread is that the browser does send time information in the form of an HTTP Date header which RevServer simply ignores. I want all the headers available, if we don't have all the headers then we'll loose some information such as ETag, if-modified-since and custom headers sent by some applications. It will me impossible to implement some features because the headers are not available On Thu, Jan 21, 2010 at 1:11 PM, Robert Brenstein r...@robe ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- Pierre Sahores mobile : (33) 6 03 95 77 70 www.wrds.com www.sahores-conseil.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: ON-Rev Docs (was Re: Getting user's time from web revlet?)
stephen barncard stephenrevoluti...@barncard.com wrote: When is Revolution going to [snip] +1 What about The Missing Manual for On-Rev ? ;-) ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
On Wed, Jan 20, 2010 at 12:29 AM, Tim Selander selan...@tkf.att.ne.jp wrote: Thanks for clearing up the .irev/revlet confusion in my head. I've read through the thread a couple times... and it seems you CANNOT get the user/browser's date and time through RevServer scripts. Correct? Anyone have a javascript snippet they like to use to get the user's date and time? thanks. As far as I know, the JavaScript Date object gives the browser's date time. Here is a routine I have to showing a time stamp: function showTimeStamp() { // show the current date time in the divider bar var date = new Date(); var m = date.getMinutes(); var s = date.getSeconds(); // add a zero in front of numbers 10 if (m 10) { m = 0 + m; } if (s 10) { s = 0 + s; } // format into d/m/h:mm:ss var currentDate = date.getDate() + / + (date.getMonth() + 1) + / + date.getFullYear() + + date.getHours() + : + m + : + s; $('#timestamp').text(Last step: + currentDate); } The last line uses jQuery to display the time stamp in the tag with the id timestamp, but you can also use straight JavaScript: document.getElementById(timestamp).innerHTML = currentDate; Note that I have the date formatted in the English/Australian style (d/m/y), so swap the segments around if you want American dates. HTH, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
On Jan 20, 2010, at 6:04 PM, Sarah Reichelt wrote: As far as I know, the JavaScript Date object gives the browser's date time. Here is a routine I have to showing a time stamp: The original issue is that the browser does not send its system date and time to the server so that a sever-side script can use it. Your example is how to tell the browser to grab the time and date info available to it and display it for the single user. If the javascript were to update a cookie record in the spot available for a Revlet or a web page script that gets and sets cookies, then that info would be available for harvesting. The other two solutions mentioned were to ask the user to press a button to send that data, and the sneaky AJAX approach which means you trigger a script without the user interacting to send the data back to the same server or another or several of them. ( of course, no one uses computers to extract info like that ) Jim Ault Las Vegas On Jan 20, 2010, at 6:04 PM, Sarah Reichelt wrote: On Wed, Jan 20, 2010 at 12:29 AM, Tim Selander selan...@tkf.att.ne.jp wrote: Thanks for clearing up the .irev/revlet confusion in my head. I've read through the thread a couple times... and it seems you CANNOT get the user/browser's date and time through RevServer scripts. Correct? Anyone have a javascript snippet they like to use to get the user's date and time? thanks. As far as I know, the JavaScript Date object gives the browser's date time. Here is a routine I have to showing a time stamp: function showTimeStamp() { // show the current date time in the divider bar var date = new Date(); var m = date.getMinutes(); var s = date.getSeconds(); // add a zero in front of numbers 10 if (m 10) { m = 0 + m; } if (s 10) { s = 0 + s; } // format into d/m/h:mm:ss var currentDate = date.getDate() + / + (date.getMonth() + 1) + / + date.getFullYear() + + date.getHours() + : + m + : + s; $('#timestamp').text(Last step: + currentDate); } The last line uses jQuery to display the time stamp in the tag with the id timestamp, but you can also use straight JavaScript: document.getElementById(timestamp).innerHTML = currentDate; Note that I have the date formatted in the English/Australian style (d/m/y), so swap the segments around if you want American dates. HTH, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Wednesday, January 20, 2010, 6:26:53 PM, Jim Ault wrote: The original issue is that the browser does not send its system date and time to the server so that a sever-side script can use it. I think by now I've lost track of the why of this. By the time the post information reaches the server wouldn't the server's date and time be the important data points? Is there some reason the server would need to know the browser's perspective? -- -Mark Wieder mwie...@ahsoftware.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
I was the original poster and this has been a very interesting thread, though a fair bit of it has been over my head as I don't know javascript, nor html, very well. I'm working on a simple web based To Do list for some family members to share. Pops up items based on date. But I'm in Tokyo, other users are in China and the US--it's Monday here while still Sunday for you in the US. Want to pop up the items based on the date of the user, whether in Asia, US or Europe. I found some javascript solutions on the net, and now Sarah has posted a very easy to understand javascript (Sarah, you're amazing). Now I have to figure out how to get the javascript result into an irev variable... looks like I'll be exploring cookies... Tim Selander Tokyo, Japan Mark Wieder wrote: Wednesday, January 20, 2010, 6:26:53 PM, Jim Ault wrote: The original issue is that the browser does not send its system date and time to the server so that a sever-side script can use it. I think by now I've lost track of the why of this. By the time the post information reaches the server wouldn't the server's date and time be the important data points? Is there some reason the server would need to know the browser's perspective? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Tim- Wednesday, January 20, 2010, 7:59:52 PM, you wrote: I'm working on a simple web based To Do list for some family members to share. Pops up items based on date. But I'm in Tokyo, other users are in China and the US--it's Monday here while still Sunday for you in the US. Want to pop up the items based on the date of the user, whether in Asia, US or Europe. Ah... got it, I think. Couldn't you just let the server take care of its local date and then convert it at the user's end when you go to display it? If this is strictly irev scripting then that won't work because you don't know the user's info. But if you're using a revlet (and that *is* in the subject, after all) then you should be able to convert the server's internet time to the user's local time (assuming the local time on their computer is correct). -- -Mark Wieder mwie...@ahsoftware.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Another reason for using Rev CGI for the OnRev server. I am using both. The irev scripting is nice, but it is in beta, so changes are sure to be made. With CGI, you can install an engine (eg. Linux 3.5) and use that one forever, thus no shifting conditions. Andre's auto-installer works great. I also believe that all the $_SERVER variables are available including custom HTTP headers that a web page programmer or Rev programmer might want to use for security or special conditions. Of course, I also like custom properties and arrays, so uploading a stack that contains all the parameters in props is good for me. Very fast and reliable. Hope this helps this thread. I wonder about the $_SERVER variables differences. Jim Ault Las Vegas On Jan 18, 2010, at 4:07 PM, Andre Garzia wrote: ARRRGGGH! okay, it is down to this... browsers send the date header to the server, it is mandatory but the date header is not being passed to the $_SERVER variable, which means they are not passing all the headers as they should. they are just passing some of the http headers, they should simply loop all sent headers and pass them to the $_SERVER variable. Damn!!! When I checked, I used firebug to see what my browser is sending, and the date header is there as expected, it is just not being parsed by the revserver engine. On Mon, Jan 18, 2010 at 9:59 PM, Sarah Reichelt sarah.reich...@gmail.com wrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. I can't get $_SERVER[Date] to return anything, although that would be really useful. I have a test page that lists all the elements of the $_SERVER array that it can find: http://www.troz.net/onrev/samples/test.irev but it doesn't include a DATE entry. I would imagine that since On-Rev is server-side scripting, it would have no way of getting the time date from the calling browser. I would expect that this would need to use JavaScript (client-side scripting) which interacts more directly with the browser. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
I took a look at what server variables PHP uses and found that IREV is not as impoverished as some assume. One difference is that PHP has the server variable _SERVER[REQUEST_TIME] and IREV doesn't. Everything else that one might need looks about the same. Here's the php file that pumps out the info: HTML ?php print phpinfo(); ? /HTML If you scroll down you will see the server variables. You will find _SERVER[REQUEST_TIME] From the PHP docs this variable is defined as: The timestamp of the start of the request. Available since PHP 5.1.0. Does the start of the request begin when the browser sends off the packets, or does it begin when the server receives the packets? I assume it is when the server receives them. In other words, when does start begin? --- On Mon, 1/18/10, Andre Garzia an...@andregarzia.com wrote: From: Andre Garzia an...@andregarzia.com Subject: Re: Getting user's time from web revlet? To: How to use Revolution use-revolution@lists.runrev.com Date: Monday, January 18, 2010, 6:07 PM ARRRGGGH! okay, it is down to this... browsers send the date header to the server, it is mandatory but the date header is not being passed to the $_SERVER variable, which means they are not passing all the headers as they should. they are just passing some of the http headers, they should simply loop all sent headers and pass them to the $_SERVER variable. Damn!!! When I checked, I used firebug to see what my browser is sending, and the date header is there as expected, it is just not being parsed by the revserver engine. On Mon, Jan 18, 2010 at 9:59 PM, Sarah Reichelt sarah.reich...@gmail.comwrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. I can't get $_SERVER[Date] to return anything, although that would be really useful. I have a test page that lists all the elements of the $_SERVER array that it can find: http://www.troz.net/onrev/samples/test.irev but it doesn't include a DATE entry. I would imagine that since On-Rev is server-side scripting, it would have no way of getting the time date from the calling browser. I would expect that this would need to use JavaScript (client-side scripting) which interacts more directly with the browser. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Thanks for clearing up the .irev/revlet confusion in my head. I've read through the thread a couple times... and it seems you CANNOT get the user/browser's date and time through RevServer scripts. Correct? Anyone have a javascript snippet they like to use to get the user's date and time? thanks. Tim Selander Tokyo, Japan Andre Garzia wrote: Tim, .irev files are not revlets. revlets are the plugin based files to be run in a browser thru the plugin, they have the .revlet sufix. irev files are text file scripts to be run by the RevServer engine. This is just so that you don't mix them two when you search the archives or documentation, for it would yield bad search results As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. Cheers andre 2010/1/18 Tim Selander selan...@tkf.att.ne.jp Hi, I've found some ways using javascript, but does anyone know if on-rev revlets (.irev files) have a way of getting the user's date and time from their browser/PC? Thanks, Tim Selander Tokyo, Japan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Jim, You've rekindled my interest in using the Revolution engine for cgi on the server. If you keep at it I might even upload a stack or two. From your informative post I glommed onto one statement: I wonder about the $_SERVER variables differences. I have wondered about that also, so I did a little experiment. The summary is that the differences are practically nil. - IREV script goes in public_html folder - HTML ?rev repeat for each key k in $_SERVER put k br \ cr after v end repeat sort v put v ? /HTML - Output: DOCUMENT_ROOT GATEWAY_INTERFACE HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CACHE_CONTROL -- only in IREV HTTP_CONNECTION HTTP_HOST HTTP_KEEP_ALIVE HTTP_USER_AGENT PATH_INFO -- called PATH in Rev engine output PATH_TRANSLATED-- only in IREV QUERY_STRING REMOTE_ADDR REMOTE_PORT REQUEST_METHOD REQUEST_URI SCRIPT_FILENAME SCRIPT_NAME SERVER_ADDR SERVER_ADMIN SERVER_NAME SERVER_PORT SERVER_PROTOCOL SERVER_SIGNATURE SERVER_SOFTWARE - REVOLUTION engine -- script goes in cgi-bin directory - #!revolution -ui on startup put Content-Type: text/plain cr cr put the globals into v replace comma with return in v replace $ with empty in v sort v put v end startup -- OUTPUT: -- I took off the $s # -- not server variable 0 -- not server variable DOCUMENT_ROOT GATEWAY_INTERFACE HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_KEEP_ALIVE HTTP_USER_AGENT msg-- not server variable PATH -- called PATH_INFO by IREV QUERY_STRING REMOTE_ADDR REMOTE_PORT REQUEST_METHOD REQUEST_URI SCRIPT_FILENAME SCRIPT_NAME SERVER_ADDR SERVER_ADMIN SERVER_NAME SERVER_PORT SERVER_PROTOCOL SERVER_SIGNATURE SERVER_SOFTWARE --- On Tue, 1/19/10, Jim Ault jimaultw...@yahoo.com wrote: From: Jim Ault jimaultw...@yahoo.com Subject: Re: Getting user's time from web revlet? To: How to use Revolution use-revolution@lists.runrev.com Date: Tuesday, January 19, 2010, 4:48 AM Another reason for using Rev CGI for the OnRev server. I am using both. The irev scripting is nice, but it is in beta, so changes are sure to be made. With CGI, you can install an engine (eg. Linux 3.5) and use that one forever, thus no shifting conditions. Andre's auto-installer works great. I also believe that all the $_SERVER variables are available including custom HTTP headers that a web page programmer or Rev programmer might want to use for security or special conditions. Of course, I also like custom properties and arrays, so uploading a stack that contains all the parameters in props is good for me. Very fast and reliable. Hope this helps this thread. I wonder about the $_SERVER variables differences. Jim Ault Las Vegas On Jan 18, 2010, at 4:07 PM, Andre Garzia wrote: ARRRGGGH! okay, it is down to this... browsers send the date header to the server, it is mandatory but the date header is not being passed to the $_SERVER variable, which means they are not passing all the headers as they should. they are just passing some of the http headers, they should simply loop all sent headers and pass them to the $_SERVER variable. Damn!!! When I checked, I used firebug to see what my browser is sending, and the date header is there as expected, it is just not being parsed by the revserver engine. On Mon, Jan 18, 2010 at 9:59 PM, Sarah Reichelt sarah.reich...@gmail.comwrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. I can't get $_SERVER[Date] to return anything, although that would be really useful. I have a test page that lists all the elements of the $_SERVER array that it can find: http://www.troz.net/onrev/samples/test.irev but it doesn't include a DATE entry. I would imagine that since On-Rev is server-side scripting, it would have no way of getting the time date from the calling browser. I would expect that this would need to use JavaScript (client-side scripting) which interacts more directly with the browser. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Tim, Let's say Mary is in front of her computer in Tokyo. Do you want her to be able to see her local date/time appear on the web page in front of her? Or do you want that web page to send the Tokyo date/time back to the server in Houston so it can be logged there? If you want to send the data back to Houston then you have two choices. Either she can click on a link in her page to send a POST request back to Houston, or it can be done sneakily with AJAX, behind the scenes. Both of those require Javascript. We can do some dumpster diving on the javascript websites and find something. --- On Tue, 1/19/10, Tim Selander selan...@tkf.att.ne.jp wrote: From: Tim Selander selan...@tkf.att.ne.jp Subject: Re: Getting user's time from web revlet? To: How to use Revolution use-revolution@lists.runrev.com Date: Tuesday, January 19, 2010, 8:29 AM Thanks for clearing up the .irev/revlet confusion in my head. I've read through the thread a couple times... and it seems you CANNOT get the user/browser's date and time through RevServer scripts. Correct? Anyone have a javascript snippet they like to use to get the user's date and time? thanks. Tim Selander Tokyo, Japan Andre Garzia wrote: Tim, .irev files are not revlets. revlets are the plugin based files to be run in a browser thru the plugin, they have the .revlet sufix. irev files are text file scripts to be run by the RevServer engine. This is just so that you don't mix them two when you search the archives or documentation, for it would yield bad search results As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. Cheers andre 2010/1/18 Tim Selander selan...@tkf.att.ne.jp Hi, I've found some ways using javascript, but does anyone know if on-rev revlets (.irev files) have a way of getting the user's date and time from their browser/PC? Thanks, Tim Selander Tokyo, Japan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
I'm sure you don't want to do this for your current project, but what the hell I'll just mention it anyway. On the server side you could have a database that figures out the location of the browser according to the IP number it sends you. Match the location against a table of times/dates around the world and you might be right some of the time. --- On Tue, 1/19/10, Tim Selander selan...@tkf.att.ne.jp wrote: From: Tim Selander selan...@tkf.att.ne.jp Subject: Re: Getting user's time from web revlet? To: How to use Revolution use-revolution@lists.runrev.com Date: Tuesday, January 19, 2010, 8:29 AM Thanks for clearing up the .irev/revlet confusion in my head. I've read through the thread a couple times... and it seems you CANNOT get the user/browser's date and time through RevServer scripts. Correct? Anyone have a javascript snippet they like to use to get the user's date and time? thanks. Tim Selander Tokyo, Japan Andre Garzia wrote: Tim, .irev files are not revlets. revlets are the plugin based files to be run in a browser thru the plugin, they have the .revlet sufix. irev files are text file scripts to be run by the RevServer engine. This is just so that you don't mix them two when you search the archives or documentation, for it would yield bad search results As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. Cheers andre 2010/1/18 Tim Selander selan...@tkf.att.ne.jp Hi, I've found some ways using javascript, but does anyone know if on-rev revlets (.irev files) have a way of getting the user's date and time from their browser/PC? Thanks, Tim Selander Tokyo, Japan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Tim, .irev files are not revlets. revlets are the plugin based files to be run in a browser thru the plugin, they have the .revlet sufix. irev files are text file scripts to be run by the RevServer engine. This is just so that you don't mix them two when you search the archives or documentation, for it would yield bad search results As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. Cheers andre 2010/1/18 Tim Selander selan...@tkf.att.ne.jp Hi, I've found some ways using javascript, but does anyone know if on-rev revlets (.irev files) have a way of getting the user's date and time from their browser/PC? Thanks, Tim Selander Tokyo, Japan ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Andre wrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. From the browser perspective? I would have thought that server variables would report things from the server perspective, no? -- Richard Gaskin Fourth World Rev training and consulting: http://www.fourthworld.com Webzine for Rev developers: http://www.revjournal.com revJournal blog: http://revjournal.com/blog.irv ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
While perusing the revIngniter docs I came across the sentence: The On-Rev server is currently not supporting the $_Server variable HTTP_ACCEPT_CHARSET, so this function returns FALSE on this server. --- Is there a list someplace of the server variables which the On-Rev server supports? (I assume that would be the same list that you can use in your .irev pages?) Thanks again, Mike --- On Mon, 1/18/10, Richard Gaskin ambassa...@fourthworld.com wrote: From: Richard Gaskin ambassa...@fourthworld.com Subject: Re: Getting user's time from web revlet? To: How to use Revolution use-revolution@lists.runrev.com Date: Monday, January 18, 2010, 9:42 AM Andre wrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. From the browser perspective? I would have thought that server variables would report things from the server perspective, no? -- Richard Gaskin Fourth World Rev training and consulting: http://www.fourthworld.com Webzine for Rev developers: http://www.revjournal.com revJournal blog: http://revjournal.com/blog.irv ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Richard, $_SERVER holds server variable and request variables, Date is a request variable with the timestamp sent by the browser for the given request. I think it should be on some kind of $_REQUEST array but it is on the $_SERVER, everything that is not GET or POST variable goes into $_SERVER, many things from the browser perspective will be there as well. to get the time on the server we can simply use our date time functions such as the internet time :D Cheers On Mon, Jan 18, 2010 at 1:42 PM, Richard Gaskin ambassa...@fourthworld.comwrote: Andre wrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. From the browser perspective? I would have thought that server variables would report things from the server perspective, no? -- Richard Gaskin Fourth World Rev training and consulting: http://www.fourthworld.com Webzine for Rev developers: http://www.revjournal.com revJournal blog: http://revjournal.com/blog.irv ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Hi Mike, you can get infos about the $_SERVER variable here: http://samples.on-rev.com/irev-engine-notes.txt Ralf On 18.01.2010, at 16:55, Michael Kann wrote: While perusing the revIngniter docs I came across the sentence: The On-Rev server is currently not supporting the $_Server variable HTTP_ACCEPT_CHARSET, so this function returns FALSE on this server. --- Is there a list someplace of the server variables which the On-Rev server supports? (I assume that would be the same list that you can use in your .irev pages?) Thanks again, Mike ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
ON-Rev Docs (was Re: Getting user's time from web revlet?)
Sadly, ON-REV ENGINE NOTES [ LAST UPDATED 2009-06-02 BY Mark Waddingham ] is the ONLY full reference sheet on ON-Rev. (why? have they slowed up on development?) I was just going to re-post it. When is Revolution going to { 1. Show some other features promised for On-Rev (like stacks and/or GETPROP ability so we can rewrite some desktop scripts that use custom properties? 2. Print some decent, searchable, and fully complete docs on the service? 3. Make this tech available to other ISP hosts like Dreamhost? } then there is the additional information below that was sent out a while ago (by email) for some new features. This info is not available anywhere online except Nabble. The errormode property is especially helpful. Here's where to download the iRev clients: -snip--- * Mac OS X: http://www.on-rev.com/templates/onrev/files/onrevosx.dmg * Windows: http://www.on-rev.com/templates/onrev/files/onrevwindows.exe New Features: new errormode property which specifies how error messages are handled inline: display errors html formatted within page output stderr: errors are not displayed but will appear in server error logs quiet: no error display New $_POST_RAW variable Fixes: include of empty file name no longer outputs spurious characters, now throws an appropriate error (bad filename) engine crash when setting http headers PATH_TRANSLATED now contains the path to the running script file when the requested url contains extra path info after the script path PATH_INFO contains the extra path info -snip--- - Stephen Barncard San Francisco http://houseofcubes.com/disco.irev 2010/1/18 Ralf Bitter ra...@dimensionb.de Hi Mike, you can get infos about the $_SERVER variable here: http://samples.on-rev.com/irev-engine-notes.txt Ralf On 18.01.2010, at 16:55, Michael Kann wrote: While perusing the revIngniter docs I came across the sentence: The On-Rev server is currently not supporting the $_Server variable HTTP_ACCEPT_CHARSET, so this function returns FALSE on this server. --- Is there a list someplace of the server variables which the On-Rev server supports? (I assume that would be the same list that you can use in your .irev pages?) Thanks again, Mike ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
Sadly, ON-REV ENGINE NOTES [ LAST UPDATED 2009-06-02 BY Mark Waddingham ] is the ONLY full reference sheet on ON-Rev. I was just going to re-post it. When is Revolution going to { 1. Show some new features promised for On-Rev? 2. Print some decent, searchable, and fully complete docs on the service? 3. Make this tech available to other ISP hosts like Dreamhost? } - Stephen Barncard San Francisco http://houseofcubes.com/disco.irev 2010/1/18 Ralf Bitter ra...@dimensionb.de Hi Mike, you can get infos about the $_SERVER variable here: http://samples.on-rev.com/irev-engine-notes.txt Ralf On 18.01.2010, at 16:55, Michael Kann wrote: While perusing the revIngniter docs I came across the sentence: The On-Rev server is currently not supporting the $_Server variable HTTP_ACCEPT_CHARSET, so this function returns FALSE on this server. --- Is there a list someplace of the server variables which the On-Rev server supports? (I assume that would be the same list that you can use in your .irev pages?) Thanks again, Mike ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. I can't get $_SERVER[Date] to return anything, although that would be really useful. I have a test page that lists all the elements of the $_SERVER array that it can find: http://www.troz.net/onrev/samples/test.irev but it doesn't include a DATE entry. I would imagine that since On-Rev is server-side scripting, it would have no way of getting the time date from the calling browser. I would expect that this would need to use JavaScript (client-side scripting) which interacts more directly with the browser. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Getting user's time from web revlet?
ARRRGGGH! okay, it is down to this... browsers send the date header to the server, it is mandatory but the date header is not being passed to the $_SERVER variable, which means they are not passing all the headers as they should. they are just passing some of the http headers, they should simply loop all sent headers and pass them to the $_SERVER variable. Damn!!! When I checked, I used firebug to see what my browser is sending, and the date header is there as expected, it is just not being parsed by the revserver engine. On Mon, Jan 18, 2010 at 9:59 PM, Sarah Reichelt sarah.reich...@gmail.comwrote: As for getting the clients time using RevServer files check out the variable $_SERVER[Date], it will contain a timestamp from the browser perspective. Hope this helps. I can't get $_SERVER[Date] to return anything, although that would be really useful. I have a test page that lists all the elements of the $_SERVER array that it can find: http://www.troz.net/onrev/samples/test.irev but it doesn't include a DATE entry. I would imagine that since On-Rev is server-side scripting, it would have no way of getting the time date from the calling browser. I would expect that this would need to use JavaScript (client-side scripting) which interacts more directly with the browser. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution -- http://www.andregarzia.com All We Do Is Code. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution