获取网络授时数据
各位大侠,请问用VFP程序如何从http://www.获取时间数据(有年月日即可,不从本地系统中获取)?谢谢!
有个问题,服务中止或停止和网页更改可能就失效。
of = CREATEOBJECT("form1")
of.show(1)
DEFINE CLASS form1 as form
ADD OBJECT edit1 as editbox WITH top=10,left=10,width=300,height=200
ADD OBJECT WB as Olecontrol WITH width=0,OleClass="Shell.Explorer.2"
PROCEDURE Init
this.WB.Silent = .T.
this.WB.Navigate("http://www., 0, NULL, NULL, NULL)
ENDPROC
PROCEDURE WB.documentComplete(pdisp, url)
IF (SYS(3095, pdisp) == SYS(3095, this))
DO WHILE EMPTY(thisform.WB.document.getElementById("web").innerHTML)
INKEY(1)
ENDDO
thisform.edit1.seltext = thisform.WB.document.getElementById("web").innerHTML+0h0D
ENDIF
ENDPROC
ENDDEFINE