Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need the Date
Message
De
14/03/2017 08:35:08
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01649027
Message ID:
01649030
Vues:
87
This message has been marked as a message which has helped to the initial question of the thread.
J'aime (1)
>I have a new product that is licensed by the year - anyone know the best way to grab the current Date out in web land somewhere (instead of just checking the local computers clock)? Code sample would also be appreciated. I am using VFP 9 SP2.
>
>Thanks in advance....

A very very simple way of doing this, without too much of a fuss, is to check on a highly available web site (W3, Google, ...) and read its date.
LOCAL HttpCall AS MSXML2.ServerXMLHTTP60

m.HttpCall = CREATEOBJECT("MSXML2.ServerXMLHTTP.6.0")
m.HttpCall.Open("Get", "https://www.w3.org")
m.HttpCall.Send()
? m.HttpCall.Getresponseheader("Date")
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform