denis-tarankov

Denis Tarankov / Signal(ping)

Jan 13th, 2020
763
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $remoteHost         = IniRead ($configFileName, "main", "host", "188.40.139.66")
  2. $timerSignal        = TimerInit()
  3.  
  4.  
  5. While 1
  6.     Sleep(125)
  7.  
  8.     If TimerDiff($timerSignal) > 1 * 60 * 1000 Then
  9.         Signal()
  10.         $timerSignal = TimerInit()
  11.     EndIf   ; Периодический сигнал
  12.  
  13. WEnd
  14.  
  15.  
  16. Func Signal()
  17.     Local $resultSignal
  18.  
  19.     __ConsoleWrite('Function starting: Signal()' & @CRLF)
  20.     $resultSignal = _SendPost("http://" & $remoteHost & "/module/update/signal.php", 'stationID=' & @ComputerName)
  21.     __ConsoleWrite("Result signal: " & $resultSignal & @CRLF)
  22. EndFunc
RAW Paste Data