Results 1 to 5 of 5

Thread: Getting the time of server

  1. #1

    Thread Starter
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Getting the time of server

    I was thinking is it possible to take the time of a server.
    From Google.com for example.
    Or no?
    Also do i need permission to access that kind of data?

    P.s
    I do not have a VS to work with here, so any links will help.
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Getting the time of server

    You should look into SNTP, which is the protocol designed for client applications or devices to synchronise themselves with time servers. I'm sure that you could create your own SNTP client very easily using a TcpClient or Socket.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Getting the time of server

    This might be a crazy idea but here is goes.

    1) Go to Google.com and type "Local Time"
    2) Get that url and open the page sources code via VB.net project.
    3) Find the String were the local time is being displayed.
    4) Read that string and display it as label or Message box?

    Any ideas?
    Or maybe Google\Bing\Yahoo has some API that can display time?
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Getting the time of server

    You've given no indication whatsoever that you've even seen my post. If you don't want to use my suggestion for whatever reason that's fine, but don't you think that an acknowledgement at the very least would be courteous?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Getting the time of server

    Thank you for the reply jmcilhinney.

    I will look into SNTP or maybe a AIP.
    I will post anything good that works.
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width