Is their a way to find out users computer time in php?

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
dustout
Forum Newbie
Posts: 7
Joined: Mon May 28, 2007 10:36 pm

Is their a way to find out users computer time in php?

Post by dustout »

I have been working on a php dynamic sig that counts down to events and converts the time into a way that doesnt require timezones. Currently the below two designs are the best looking ones. However if their were a way to load the users computer time into the algorithm then it would become alot easier to display the converted time.

So basically i want to know if their is a method that i can use to load the users computer time into a variable named usrtime


Design 1
Image

Design 2
Image
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If your only interaction point is provided by an image link the only information you will receive will be in the request headers. I don't recall browsers sending their time information in requests.
dustout
Forum Newbie
Posts: 7
Joined: Mon May 28, 2007 10:36 pm

Post by dustout »

feyd wrote:If your only interaction point is provided by an image link the only information you will receive will be in the request headers. I don't recall browsers sending their time information in requests.
as far as i know the below snippit is all i recieve from the average image request
121.45.176.71 - - [01/Jul/2007:00:10:04 -0500] "GET /sig/mssw2dynsig.png HTTP/1.1" 200 19261 "http://www.ladyraven.biz/forums/viewtop ... 8&start=15" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"


I just figured that since some ads say "Meet people in Edmonton" (edmonton being where i live) it would be possible to get someone's time as well. Perhaps their is a link between IP address and timezone :?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

There is "some" correlation between IP and location, but it's sometimes quite inaccurate. In some regions you need that accuracy to determine timezone. There's typically more information in the request headers outside of those recorded by Apache logs. Some of this data is provided in $_SERVER. You may also be able to use apache_request_headers().
dustout
Forum Newbie
Posts: 7
Joined: Mon May 28, 2007 10:36 pm

Post by dustout »

feyd wrote:There is "some" correlation between IP and location, but it's sometimes quite inaccurate. In some regions you need that accuracy to determine timezone. There's typically more information in the request headers outside of those recorded by Apache logs. Some of this data is provided in $_SERVER. You may also be able to use apache_request_headers().
I didnt see anything in the apache_request_headers() info thing that would allow me to do what i want to do :(

i guess their isnt an easy and efficent way to do this like i was hopeing, but before i give up i'll take a look into the ip location method just for kicks :P
Post Reply