Svar: [AccessD] A2003:Test Voracity of URLS

Erwin Craps - IT Helps Erwin.Craps at ithelps.be
Wed Nov 17 06:29:25 CST 2004


Seeing this, I wunder if there is someone who has some code (and wants
to share it) to check all hyperlinks in the favorites of IE to see if
the page/website still exists?

Beeing on the internet for probably about 10 years now got me a lot of
favorites that are aged and no longer exists...

I like to clean up (sometimes).

Erwin


 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Wednesday, November 17, 2004 10:36 AM
To: accessd at databaseadvisors.com
Subject: Svar: [AccessD] A2003:Test Voracity of URLS

Hi Darren
 
We use these functions:
 
<code module>
 
Private Declare Function URLDownloadToFile Lib "urlmon" Alias
"URLDownloadToFileA" ( _
  ByVal pCaller As Long, _
  ByVal szURL As String, _
  ByVal szFileName As String, _
  ByVal dwReserved As Long, _
  ByVal lpfnCB As Long) _
  As Long

Public Function IsURL(ByVal strURL As String) As Boolean
 
' Usage: Check if URL strURL is alive and reachable.
'   booURL = IsURL("http://www.ibm.com")
'   booURL = IsURL("ftp://ftp.novell.com")
'
' Note: Protocol header like "http://" must be provided.
'
' 2001-12-09. Cactus Data ApS. CPH.
 
  ' File found at most URLs.
  Const cstrFileIndex As String = "index.htm"
 
  IsURL = (URLDownloadToFile(0, strURL, cstrFileIndex, 0, 0) = 0)
  
End Function

</code module>
 
If your URLs contains html document name you will have to modify the
code to use that and not append index.html.
 
/gustav

>>> d.dick at uws.edu.au 17-11-2004 05:03:08 >>>

I have an educational client who has a CD full of Education URL's
(Zillion's of 'em) Occasionally someone has to test to see if the links
are broken or not (Manually <yuk>)

I thought this would be a perfect application for Access Set up a table
of URLs and loop through 'em and return TRUE or FALSE

So...Is there a way I can type in
say...http://somewebsite.someserver.com.au
and return "true" if the site exists or "false" if the site does not
exist.
 
--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list