eyeshield21
Programmer
what is the easiest way to create a demo which will expire after such and
such days?
and also to prevent the user to change system date
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
loXmlHttp = Createobject("MSXML2.XMLHTTP")
loXmlHttp.Open("HEAD", "[URL unfurl="true"]https://www.google.com/?q=",.F.)[/URL]
loXmlHttp.Send()
Do While loXmlHttp.readyState <>4
DoEvents
Enddo
? loXmlHttp.getResponseHeader("Date")
? GetDynamicUTCBias()
Procedure GetDynamicUTCBias()
* UTC = local time + bias => local time = UTC - bias.
* bias is in minutes.
#Define TIME_ZONE_ID_UNKNOWN 0
#Define TIME_ZONE_ID_STANDARD 1
#Define TIME_ZONE_ID_DAYLIGHT 2
#Define TIME_ZONE_ID_INVALID 0xFFFFFFFF
DECLARE INTEGER GetDynamicTimeZoneInformation IN kernel32;
STRING @ lpTimeZoneInformation
Local lpTimeZoneInformation, lnTZID, lnTZBias, lnStandardBias, lnDaylightBias, lnDynamicBias
lpTimeZoneInformation = Space(429)
lnTZID = GetDynamicTimeZoneInformation(@lpTimeZoneInformation)
lnTZBias = CToBin(Substr(lpTimeZoneInformation,1,4),"SR")
lnStandardBias = CToBin(Substr(lpTimeZoneInformation,84,4),"SR")
lnDaylightBias = CToBin(Substr(lpTimeZoneInformation,169,4),"SR")
Do Case
Case lnTZID = TIME_ZONE_ID_INVALID
Error "Your system timezone setting is invalid"
Case lnTZID = TIME_ZONE_ID_UNKNOWN OR lnTZID = TIME_ZONE_ID_STANDARD
* A Warning on TIME_ZONE_ID_UNKNOWN would be appropriate
* but let's keep it to a minimum handling of special cases
* and assume standard time in this case
lnDynamicBias = lnTZBias+lnStandardBias
Case lnTZID = TIME_ZONE_ID_DAYLIGHT
lnDynamicBias = lnTZBias+lnDaylightBias
EndCase
Return lnDynamicBias
Why do a limited demo based on calendar time? Why not limit the number of records stored into a specific table.