Getting user's time from web revlet?

Michael Kann mikekann at yahoo.com
Tue Jan 19 08:59:48 EST 2010


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 <andre at andregarzia.com> wrote:

> From: Andre Garzia <andre at andregarzia.com>
> Subject: Re: Getting user's time from web revlet?
> To: "How to use Revolution" <use-revolution at lists.runrev.com>
> Date: Monday, January 18, 2010, 6:07 PM
> AAAAARRRGGGHHHHH!!!!!
> 
> 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.reichelt at 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 at 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 at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage
> your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 


      



More information about the use-livecode mailing list