A question about the internet transfer control.

Is there and easy way to determin if a url is bad without sorting throught it's source?
hessAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
soedingConnect With a Mentor Commented:
Dim txt$
Dim pos%

Inet1.OpenURL("myURL", 1)
txt = Inet1.GetHeader()

' Headers like "HTTP/1.1 Error 404" are always in the first line:
pos = Instr(1, txt, vbCrLf)
txt = Mid(txt, 1, pos-1)

If Instr(1, txt, "404") > 0 Then
    ' Error 404
End If


0
 
MirkwoodCommented:
How do you mean is bad. You mean that the syntax is correct or something.
0
 
hessAuthor Commented:
error 404
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.