
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.