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.
Option Explicit
Dim Title,URLArray,URL,ws,Msg,Data
Title = "Audio and Video Stream Checker"
Call ForceCScriptExecution(Title)
URLArray = Array("[URL unfurl="true"]https://5ac31d8a4c9af.streamlock.net/saheltv/_definst_/myStream/chunklist_w956788169.m3u8"_[/URL]
,"[URL unfurl="true"]http://aska.ru-hoster.com:8053/autodj"_[/URL]
,"[URL unfurl="true"]http://www.chocradios.ch/djbuzzradio_windows.mp3.asx")[/URL]
For Each URL in URLArray
wscript.echo URL & vbCrlf & CheckOnline(URL) & vbCrlf & String(100,"-")
Next
'----------------------------------------------------
Function CheckOnline(URL)
On Error Resume Next
Const WHR_EnableRedirects = 6
Dim h,AllResponseHeaders
Set h = CreateObject("WinHttp.WinHttpRequest.5.1")
h.Option(WHR_EnableRedirects) = False 'disable redirects
h.Open "HEAD", URL , False
h.Send()
AllResponseHeaders = h.GetAllResponseHeaders()
wscript.echo AllResponseHeaders
If Err.number = 0 Then
wscript.echo "STATUS : "& CInt(h.status) & vbTab & h.statusText
Select Case CInt(h.status)
Case 200,201,202,204
CheckOnline = "ONLINE"
Case 404,401,412,415,500,501,500,501
CheckOnline = "OFFLINE" & vbCrlf & h.status & " " & h.statusText
Case Else
CheckOnline = "OFFLINE" & vbCrlf & h.status & " " & h.statusText
End Select
Else
CheckOnline = "OFFLINE" & vbCrlf &_
"Error Description: " & Err.Description
On Error Goto 0
End IF
End Function
'----------------------------------------------------
Sub ForceCScriptExecution(Title)
Dim Arg, Str, cmd
cmd = "CMD /K Title " & Title &" & color 0A & "
If Not LCase( Right( WScript.FullName, 12 ) ) = "\cscript.exe" Then
For Each Arg In WScript.Arguments
If InStr( Arg, " " ) Then Arg = """" & Arg & """"
Str = Str & " " & Arg
Next
CreateObject( "WScript.Shell" ).Run _
cmd & "cscript //nologo """ & _
WScript.ScriptFullName & _
""" " & Str
WScript.Quit
End If
End Sub
'--------------------------------------------------
Cache-Control: no-cache
Date: Mon, 30 Dec 2019 23:56:03 GMT
Content-Length: 232
Content-Type: application/vnd.apple.mpegurl
Accept-Ranges: bytes
Server: WowzaStreamingEngine/4.7.8
Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
STATUS : 200 OK
[URL unfurl="true"]https://5ac31d8a4c9af.streamlock.net/saheltv/_definst_/myStream/chunklist_w956788169.m3u8[/URL]
ONLINE
----------------------------------------------------------------------------------------------------
Cache-Control: no-cache
Date: Mon, 30 Dec 2019 23:56:06 GMT
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Server: Icecast 2.4.2
STATUS : 400 Bad Request
[URL unfurl="true"]http://aska.ru-hoster.com:8053/autodj[/URL]
OFFLINE
400 Bad Request
----------------------------------------------------------------------------------------------------
Connection: keep-alive
Date: Mon, 30 Dec 2019 23:56:04 GMT
Content-Type: text/html; charset=iso-8859-1
Location: [URL unfurl="true"]https://www.chocradios.ch/djbuzzradio_windows.mp3.asx[/URL]
Server: nginx
X-Powered-By: PleskLin
STATUS : 302 Found
[URL unfurl="true"]http://www.chocradios.ch/djbuzzradio_windows.mp3.asx[/URL]
OFFLINE
302 Found
----------------------------------------------------------------------------------------------------