Results 1 to 2 of 2

Thread: inet question.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2005
    Posts
    15

    inet question.

    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?

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: inet question.

    If it returns nothing it isn't online or doesn't exist.
    Use the Microsoft Internet Transfer Control

    VB Code:
    1. Private Sub Form_Load()
    2.   Text2.Text = Inet1.OpenURL("http://members.aol.com/dandono/180205.txt", icString)
    3. End Sub
    4.  
    5. Private Sub Text1_Change()
    6. If InStr(1, Text1.Text, ",") = 0 Then
    7.     If InStr(1, Text2.Text, Text1.Text) = 0 Then MsgBox "Activation code not found" Else MsgBox "Program activated successfully", vbExclamation
    8. Else: MsgBox "Illegal characters"
    9.     End If
    10. 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width