Alright, a friend of mine told me an easy way to check if a url is valid is just to send it to inet, and set the timeout to four.
If inet times out then the website doesn't exist.
How on earth do I do this using VB6?
Printable View
Alright, a friend of mine told me an easy way to check if a url is valid is just to send it to inet, and set the timeout to four.
If inet times out then the website doesn't exist.
How on earth do I do this using VB6?
If it returns nothing it isn't online or doesn't exist.
Use the Microsoft Internet Transfer Control
VB Code:
Private Sub Form_Load() Text2.Text = Inet1.OpenURL("http://members.aol.com/dandono/180205.txt", icString) End Sub Private Sub Text1_Change() If InStr(1, Text1.Text, ",") = 0 Then If InStr(1, Text2.Text, Text1.Text) = 0 Then MsgBox "Activation code not found" Else MsgBox "Program activated successfully", vbExclamation Else: MsgBox "Illegal characters" End If End Sub
This grabs a text file from a site, and finds a code to activate an app. You can just download the text of the site.