|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Just an Idea - IP Address, Timezone and Client's Local Time
Hey ... I have this idea ...
Not that I have any use of it right now, but I was thinking about how you can estimate the localtime of a visitor, just in case you would like to store in the log. Maybe later then you can see what time your visitors visits you most. Now, you can always identify your visitors IP, right. And with GeoIP or IP2Location, you determine your visitors longitude. When you know your own server's longitude, your visitors longitude and your server's current time, you can write a script to calculate the differences in the longitude degree and come out with the local time of the visitor. Well, maybe this is not 100% accurate becuase time zones are determine by political factor as well. But I think, you can more or less determine the local time of your visitors, where ever he's logging to your website from. There you go ... just a thought. |
|
#2
|
||||
|
||||
|
well in some cases this will work but most of those GeoIP and IP2Location things will show me being in Sydney when I am infact in Perth, which has 2 hours time difference (+1 in summer due to day light savings time).
This is due to our internet connection being with a telco who routes traffic via Sydney ![]() |
|
#3
|
|||
|
|||
|
Yeah ... I guess you are right. But I think this is as close as you get to getting the local time off the client ...
|
|
#4
|
||||
|
||||
|
depends on the situation. and whether they support javascript and perhaps cookies.
__________________
Send me a private message if you would like me to setup your DNS for you for a price of your choosing. This is the preferred method if your DNS needs to be fixed/setup fast and you don't have the time to bounce messages back and forth on a forum. Also, check out these links: Whois Direct | DNS Crawler | NS Trace | Compare Free DNS Hosts |
|
#5
|
|||
|
|||
|
Quote:
Javascript and Cookie ... why would you need that? I think all the programming can be done at server side with things like PHP / ASP / or what ever .... |
|
#6
|
||||
|
||||
|
only if you insist on using the IP to determine time zone. It's far more efficient if you would just ask the user to provide their time zone in their profile in the case of an account system. Your second best option is using javascript and optionally cookies to feed the user's current time to the server via a script and then calculate time zone and store it in a file associating the info to that IP. It's far easier, more efficient, and more accurate.
|
|
#7
|
|||
|
|||
|
depend on the internet connection ,cookies and so on ...
|
![]() |
| Viewing: Dev Shed Forums > System Administration > DNS > Just an Idea - IP Address, Timezone and Client's Local Time |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|