|
-
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?
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
|