Search Knowledgebase:![]() |
How can I monitor the HTTP header?
User question:
> I want to monitor the HTTP header of a bookmark check. I'm not
> interested in the page itself, only in the HTTP header.
This can be done with a Plugin that replaces the page content with the HTTP header.
1. Open the bookmark properties
2. Select the Advanced tab
3. Select "Plugin" on the left side
4. Click the button "Create Private Plugin"
5. Enter the following plugin code:
Sub Wsw_PreProcessPage(Handle, ByRef sMemWeb, ByRef sStatusMessage, ByRef iStatusCode)
Dim i, p, s
Dim sLog = Bookmark_GetProperty(Handle, "check_log")
sMemWeb = "<html><head>"
sMemWeb = sMemWeb + "<meta http-equiv='content-type' content='text/html; charset=UTF-8'>"
sMemWeb = sMemWeb + "<meta name='viewport' content='width=device-width,initial-scale=1'>"
sMemWeb = sMemWeb + "<title>LOG</title></head><body>"
For i = 0 To StringList_ItemCount(sLog) - 1
s = StringList_GetItem(sLog, i)
p = Pos("hdr>", s)
If p > 0 Then
s = Copy(s, p+5, MaxInt)
sMemWeb = sMemWeb + s + "<br>"
End If
Next
sMemWeb = sMemWeb + "</body></html>"
End Sub