Question How to detect whether an internet address is broken

jaina00

New member
Joined
Nov 30, 2010
Messages
2
Programming Experience
1-3
Hello.
I am looking for a way to test whether each internet link in a list of internet links is valid.
Do you know of any software that does this?

Basically, I would like to provide a text file as input and have the software report on whether each link is valid or invalid.

The sample text file might look like the below text:
Bayonet Ventures LLP. Home
http://bayonetventure.com/

Note that the first above link is valid, but the second link is missing an “s” at the end. The problem with the software that we have tested is that it reports both above links as being valid. This is because when you click on the second (non-valid) link, you are redirected to
OpenDNS.
Therefore, the software that we tested cannot detect that the second link is broken.

Does anyone know of any software that is sophisticated enough to deal with this issue? We are happy to write our own Dot Net / VBA code, if we get a push in the right direction.

Many thanks for your help.


Abhishek
 
This works although with a delay and isn't really the correct way but this is the only way i could think of without having to go and program sockets

VB.NET:
    Function IsLinkValid(ByVal address As String) As Boolean
        Dim valid As Boolean
        Try
            Dim b As System.Net.WebClient = New System.Net.WebClient
            Dim buf As System.IO.Stream = b.OpenRead(adDress)
            valid = True
            b.Dispose()
        Catch ex As Exception
            valid = False
        End Try

        Return (valid)
    End Function
 
Back
Top