Som jeg skrev i 02/11-2006 13:23:41, er det ikke alle servere der sender "last-modifed" med..
Dvs, Inet1.GetHeader("Last-modified") kan returnere en tom streng..
Koden fra
http://www.freevbcode.com/ShowCode.asp?ID=362 :
' #VBIDEUtils#****************************************************
' * Programmer Name : Waty Thierry
' * Web Site :
www.geocities.com/ResearchTriangle/6311/' * E-Mail : waty.thierry@usa.net
' * Date : 28/07/99
' * Time : 16:40
' **************************************************************
' * Comments : Determine when a web page was last modified
' *
' *
' *************************************************************
'set a reference to the Microsoft Internet Control and then use
'the below
Public Function PageLastModified(URL as string) as String
Dim strHeader As String
'set protocol to HTTP
Inet1.Protocol = icHTTP
'open URL
On Error Resume Next
Inet1.OpenURL (URL)
if Err.Number > 0 then Exit Function
' Retrieve the date page was last modified
strHeader = Inet1.GetHeader("Last-modified")
PageLastModified = strHeader
End Function
Kaldes f.eks. med:
dim dato as string
dato = PageLastModified("
http://www.eksperten.dk")
msgbox dato