
Private Sub Command1_Click()
With Inet1
.Execute CStr("http://123."), "GET"
Do While .StillExecuting
DoEvents
Loop
T = .GetHeader
If InStr(1, T, "404 Not Found") <> 0 Then
MsgBox "网页不存在!"
Else
MsgBox "网页在!"
End If
End With
End Sub
网页明明是不存在的,Inet1控件却提示存在,还有就是不连网也是提示网页存在With Inet1
.Execute CStr("http://123."), "GET"
Do While .StillExecuting
DoEvents
Loop
T = .GetHeader
If InStr(1, T, "404 Not Found") <> 0 Then
MsgBox "网页不存在!"
Else
MsgBox "网页在!"
End If
End With
End Sub
