HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/bin/scripts/StockNotifications.vbs
' (SS,27/4/12) stock notifications run at a scheduled time (see setat.cmd and Control Panel for actual schedule)
' (SS,27/7/17) added s to http, HF now HTTPS (at line 13, LURL =)
AddLog ""
Call SendNotifications("www.hyperflight.co.uk")
 
Sub SendNotifications(AWebsite) 
  On Error Resume Next

  Dim objRequest
  Dim LURL

  Set objRequest = CreateObject("Microsoft.XMLHTTP")
  LURL = "https://" + AWebsite + "/stock-notifications.asp"
  
  AddLog "1. Started:  " & LURL
  
  objRequest.open "GET", LURL, False
  objRequest.send
  
  AddLog "2. Finished: " & LURL

  Set objRequest = Nothing 
End Sub

Sub AddLog(AMessage)
	Dim fs, f
	Set fs = CreateObject("Scripting.FileSystemObject")
	Set f = fs.OpenTextFile("D:\Logs\Stock Notifications\StockNotificationsLog.txt", 8, True)
	f.WriteLine(Now & " - " & AMessage)
	f.Close
	Set f = Nothing
	Set fs = Nothing
End Sub