|
-
Feb 12th, 2007, 03:31 PM
#1
Thread Starter
Hyperactive Member
Determine Time on Someone Else’s Web Server
Hi,
I want to be able to check the time on a web server (not my own) to launch browsers (and pages on that site) at a specific time, according to THAT server's clock.
There IS a way to do it:
1) Use URLDownloadToFile API to download the page source code from the home page (which has a clock on it), this API writes the text to a file.
2) Open said file, find the tags that surround the time text, use Mid() to extract the value.
3) Determine the difference (in seconds) between the two times.
4) Using a timer, update using my system's time plus the difference.
That's seems pretty round-about. Who knows how much lag-time could occur. Then there is also a problem using DateAdd() when the server time hits midnight. The DateAdd() result keeps the PM and sets the hour to zero-one ( i.e., “01:00:00 PM” rather than 00:00:00 AM). But that's a secondary issue.
Is there a more efficient way of obtaining and maintaining the server's time? Milliseconds are not important, but seconds are.
Keep in mind that some of my users will still be using dial-up. IF there is a way to ping the server regularly for its time, will there be a dramatic hit on bandwidth?
Suggestions, please?
-
Feb 14th, 2007, 02:38 PM
#2
Thread Starter
Hyperactive Member
Re: Determine Time on Someone Else’s Web Server
This seems like it would be a relatively easy thing to do. Someone must know how to do it.
So I'm bumping it.
-
Feb 15th, 2007, 04:54 PM
#3
Thread Starter
Hyperactive Member
Re: Determine Time on Someone Else’s Web Server
I really could use some help with this. Anyone out there?
-
Feb 15th, 2007, 10:53 PM
#4
Hyperactive Member
Re: Determine Time on Someone Else’s Web Server
Here are two links that show you two different methods, the first uses SNTP protocol, the second HTTP protocol.
Link #1: http://vbnet.mvps.org/index.html?cod...cksynctime.htm
Link #2: http://brigsoft.com/atomic-clock-syn...cVbArticle.htm
-
Feb 16th, 2007, 01:30 AM
#5
Member
Re: Determine Time on Someone Else’s Web Server
You can use NetRemoteTOD API to get server time info
-
Feb 16th, 2007, 01:58 PM
#6
Thread Starter
Hyperactive Member
Re: Determine Time on Someone Else’s Web Server
NetRemoteTOD seems to only work on NT servers within your network, not for servers on the Internet. Link #2 appears to only read Universal Time from an atomic clock site. Apparently it (the site) is sent up to supply the time when asked for. In my case, I don't have that luxury.
I'm still looking into Link #1 though it appears to have the same limitation as Link #2.
Thanks for looking into this form me. Ideas and/or clarification is appreciated!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|