Results 1 to 3 of 3

Thread: AutoSubmit Over the Internet

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    AutoSubmit Over the Internet

    I have to submit multiple urls to the indexes for our company. the code below only works when submitting to one search index. Can anyone modify this to submit 10 urls then move to the next search index in the list?

    Code:
    Private Sub cmdSubmitAll_Click()
       
        Dim submitGoogle As String
        Dim submitCanada As String
        Dim submitHotBot As String
        Dim submitLycos As String
        Dim submitWebCrawler As String
        Dim submitExcite As String
        Dim submitFast As String
        Dim submitNorthernLight As String
        Dim submitDirectHit As String
        Dim submitAnzwers As String
        
        submitGoogle = "http://www.google.com/addurl.html"
        submitCanada = "http://www.canada.com/search/web/addurl.asp"
        submitHotBot = "http://hotbot.lycos.com/addurl.asp"
        submitLycos = "http://www.lycos.com/addasite.html"
        submitWebCrawler = "http://www.excite.com/info/add_url_form/"
        submitExcite = "http://www.excite.com/info/add_url_form/"
        submitFast = "http://www.ussc.alltheweb.com/add_url.php3"
        submitDirectHit = "http://directhit.com/util/submiturl.asp?Hidden1=disp&Hidden1=addurl&Hidden1=DH_ADDURL&Text1=http%3A%2F%2Fwww.test&Text1=test&Text2=&Submit1=Submit%21"
        submitAnzwers = "http://www.anzwers.com.au/cgi-bin/print_addurl.pl?"
        
        Dim i As Integer
        
        For i = 0 To 9
            urlSubmit(i) = Text1(i)
        Next
        
        If chkGoogle.Value = 1 Then
            WebBrowser1.Navigate submitGoogle
        End If
        
    '    If chkCanada.Value = 1 Then
    '        WebBrowser1.Navigate submitCanada
    '    End If
    '
    '    If chkHotBot.Value = 1 Then
    '        WebBrowser1.Navigate submitHotBot
    '    End If
    '
    '    If chkLycos.Value = 1 Then
    '        WebBrowser1.Navigate submitLycos
    '    End If
    '
    '    If chkWebCrawler.Value = 1 Then
    '        WebBrowser1.Navigate submitWebCrawler
    '    End If
    '
    '    If chkExcite.Value = 1 Then
    '        WebBrowser1.Navigate submitExcite
    '    End If
    '
    '    If chkFAST.Value = 1 Then
    '        WebBrowser1.Navigate submitFast
    '    End If
    '
    '    If chkDirectHit.Value = 1 Then
    '        WebBrowser1.Navigate submitDirectHit
    '    End If
    '
    '    If chkAnzwers.Value = 1 Then
    '        WebBrowser1.Navigate submitAnzwers
    '    End If
        
        
        rs.Close
        conn.Close
        Set rs = Nothing
        Set conn = Nothing
        Exit Sub
        
    SendErr:
        MsgBox Error
    
    End Sub
    
    
    Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
        Dim strHTML As String, googleAddy As String
        Dim email As String
        
        Dim submitGoogle As String, submittedGoogle As String
        Static x As Integer
    
        submitGoogle = "http://www.google.com/addurl.html"
        submittedGoogle = Mid(WebBrowser1.LocationURL, 1, 29)
    
        If (pDisp = WebBrowser1.Object) Then
            If submittedGoogle = "http://www.google.com/addurl?" Then
                WebBrowser1.Navigate submitGoogle
            ElseIf WebBrowser1.LocationURL = submitGoogle Then
                With WebBrowser1.Document.Forms(1)
                    If x > 9 Then Exit Sub
                    .All("q").Value = urlSubmit(x)
                    .All("dq").Value = "This is the comments input box"
                    .All("submit").Click
                    Text2.Text = Text2.Text & urlSubmit(x) & vbCrLf
                    x = x + 1
                End With
            End If
        End If
        
    End Sub

  2. #2
    jim mcnamara
    Guest
    IF I understand your code, you need to instantiate 9 more browser objects. Create an array of Web1(10) or whatever.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    I think you are on to something. You mean create a new object for each of the search engines I am submitting to?

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