Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 26, 1999

Find the Last Modified Date of a Web Page

Microsoft's Internet Transfer Control (MSInet.ocx) is a great tool to use to automate the Web. However, how do you know you're looking at an updated version of a Web page? Use OpenURL to navigate to a page, then use the GetHeader function to retrieve the entire HTML header, from which you can get the last modified date:

 
Dim x As String
Inet1.OpenURL ("www.devx.com")
x = Inet1.GetHeader
Debug.Print x
MsgBox Mid$(x, InStr(1, x, "Date:") + _
	Len("Date:"), 30)

Or you can request the desired header: "Date" in this case:

Inet1.OpenURL ("www.devx.com")
MsgBox Inet1.GetHeader("Date")
William Wen
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date