Advertisement
HongTamRD

Untitled

Jul 8th, 2019
793
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.64 KB | None | 0 0
  1. Func _checkDate($expiry)
  2.     Local $date, $ardate
  3.     _HttpRequest_SetTimeout(2000)
  4.     For $i = 1 To 3
  5.         _HttpRequest(0, 'https://www.google.com.vn')
  6.         If @error Then ContinueLoop
  7.         $date = _HttpRequest_QueryHeaders(9)
  8.         ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $date = ' & $date & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
  9.         $ardate = _GetHttpTime($date)
  10.         If @error Or Not IsArray($ardate) Then ContinueLoop
  11.         Return _DateDiff("D", $ardate[0] & "/" & $ardate[1] & "/" & $ardate[2], String($expiry)) > 0 ? True : False
  12.     Next
  13.     MsgBox(16, $title4, $text15 & @CRLF & $text16, 0, $Gui)
  14.     Return False
  15. EndFunc   ;==>_checkDate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement