How do I send a msg via VB app. to Internet interface, then record top 10 URL hits in the VB interface? Pls help 
Author Message
 How do I send a msg via VB app. to Internet interface, then record top 10 URL hits in the VB interface? Pls help

I am working on an application to test search
engines. I have a database of questions and want
to enter these into various internet search
engines and see what the results are.

I don't want to type the results in by hand so
what I was wondering is....

Can I create a VB application that sends a msg
off to an internet interface, enters the
question, initiates the search and then stores
the top 10 hits in an Access (or equiv) database
for comparison with other search engines.

Your help will be appreciated. (I am very new at
VB programming)

Thanks
Donald


Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 19 May 2002 03:00:00 GMT  
 How do I send a msg via VB app. to Internet interface, then record top 10 URL hits in the VB interface? Pls help
You'd have to vary your app for each search engine as they all have
different ways of searchin.  For Webcrawler;

Option Explicit

Private Sub Command1_Click()
Text1 = ""
Winsock1.Protocol = sckTCPProtocol
Winsock1.Connect "www.webcrawler.com", 80

End Sub

Private Sub Winsock1_Connect()
Dim sText As String

    sText = "GET /cgi-bin/WebQuery?searchText=" & txtSearch & " HTTP/1.0" &
vbCrLf & "Accept: text/html" & vbCrLf & vbCrLf
    Winsock1.SendData sText
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim sText As String

    On Error Resume Next
    Winsock1.GetData sText
    Text1 = Text1 & sText
End Sub

Private Sub Winsock1_Error(ByVal Number As Integer, Description As String,
ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal
HelpContext As Long, CancelDisplay As Boolean)
    MsgBox Number & " - " & Description, vbCritical, App.Title
End Sub

This needs a multi-line textbox, a textbox for the search text and a winsock
control.  In the results webcrawler have

- show

If you search for this in the results and parse the HTML to extract the
links that follow you can get the results.  It's not a simple task.



Sun, 19 May 2002 03:00:00 GMT  
 How do I send a msg via VB app. to Internet interface, then record top 10 URL hits in the VB interface? Pls help
On my site (http://vbpoint.cjb.net/) there is an example on how to query the
altavista search engine using the webbrowser control and mshtml. (fill a
form)

Getting the results may be a more difficult, you can use the
mshtmldocument.links to get all links on the site, but you'll still need to
select the which are the results.

Placing the results into a Access database should not be a problem.

--
Stephan

My site: http://www.casema.net/~dolman/s/

FREE discover how to make $5000 a week:
http://www.secrets2success.com/special31270/

FREE VB Source: http://vbpoint.cjb.net/



Quote:
> I am working on an application to test search
> engines. I have a database of questions and want
> to enter these into various internet search
> engines and see what the results are.

> I don't want to type the results in by hand so
> what I was wondering is....

> Can I create a VB application that sends a msg
> off to an internet interface, enters the
> question, initiates the search and then stores
> the top 10 hits in an Access (or equiv) database
> for comparison with other search engines.

> Your help will be appreciated. (I am very new at
> VB programming)

> Thanks
> Donald


> Sent via Deja.com http://www.deja.com/
> Before you buy.



Tue, 21 May 2002 03:00:00 GMT  
 How do I send a msg via VB app. to Internet interface, then record top 10 URL hits in the VB interface? Pls help
This is a good example but what if they use the POST method?


Mon, 03 Jun 2002 03:00:00 GMT  
 How do I send a msg via VB app. to Internet interface, then record top 10 URL hits in the VB interface? Pls help

Quote:
> This is a good example but what if they use the POST method?

You might find that if they use POST they will still accept the query on the
URL.  There is a way to emulate POST method (obviously) but I don't know
what it is and if someone else knows then I wouldn't mind if they passed it
on....


Tue, 04 Jun 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. SElECT TOP 10 return 11 records ?

2. Numbering the values in a Top 10 query from 1 to 10

3. Display records 10 by 10

4. Sending an email msg with attached file from vb app

5. Sending url to web browser via VB

6. VB to send URL request using POST method via Navigate

7. Sending msg via mail

8. Using 10 M memory for my VB App

9. VB 10 Express: Can i build standalone app?

10. Top 10 Things CRM is good for?

11. Top 10 - Information Systems

12. Top 10 Signs you Need an Information System!

 

 
Powered by phpBB® Forum Software