Get time and date from a server using a socket [message #65367] |
Wed, 25 February 2009 15:26  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Hello people,
I'm trying to get the time and date from a public server using this
code:
SOCKET, 1, servername, 13
date=''
READF, 1, date
CLOSE, 1
PRINT, date
I tried to get the date from all the servers that I found in the
following link: http://tf.nist.gov/tf-cgi/servers.cgi
The port 13 is the port for the daytime but I tried with 37 and 123
ports (time and NTP protocol).
I can't obtain a good result. Does anybody tried that ? Any
suggestions or comments ?
Thanks in advance,
Bernat
|
|
|
Re: Get time and date from a server using a socket [message #65386 is a reply to message #65367] |
Mon, 02 March 2009 10:34  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rick Towler writes:
> The project has whithered on the vine as I ended up doing it in
> python (a phrase I seem to be saying more and more these days)
For me, it has been R, a language I like more
and more. I suppose it is a race now between
how quickly the dinosaurs fall off (or die),
and how many new users can be recruited to use
iTools and such.
As a matter of fact, I could probably model
that function in R pretty quickly! :-)
Cheers,
David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|