NYCPHP Meetup

NYPHP.org

[nycphp-talk] Getting GMT bias from browser

Paul Reinheimer preinheimer at gmail.com
Fri Oct 6 23:03:13 EDT 2006


This isn't going to appear in any of the headers the browser is going
to send you, here's my print_r on apache_get_headers()
--
Array
(
    [User-Agent] => Opera/9.01 (Macintosh; Intel Mac OS X; U; en)
    [Host] => example.preinheimer.com
    [Accept] => text/html, application/xml;q=0.9,
application/xhtml+xml, image/png, image/jpeg, image/gif,
image/x-xbitmap, */*;q=0.1
    [Accept-Language] =>
en,ja;q=0.9,fr;q=0.8,de;q=0.7,es;q=0.6,it;q=0.5,nl;q=0.4,sv;q=0.3,nb;q=0.2
    [Accept-Charset] => iso-8859-1, utf-8, utf-16, *;q=0.1
    [Accept-Encoding] => deflate, gzip, x-gzip, identity, *;q=0
    [Cookie] => ZDEDebuggerPresent=php,phtml,php3
    [Cookie2] => $Version=1
    [Connection] => Keep-Alive, TE
    [TE] => deflate, gzip, chunked, identity, trailers
)
--

Nothing in there about the GMT bias.

I think your javascript idea however could be put to a decent use, use
javascript to request a document, write a link to an image or whatever
and send the user's current time that way. then store the information
in a cookie, or their session.


paul

-- 
Paul Reinheimer
Zend Over Certified Engineer 4^2, 5^2 :)



More information about the talk mailing list