PDA

Click to See Complete Forum and Search --> : Problem of Internet Query


fahmi07
Feb 12th, 2007, 04:45 PM
Hello,
It's my first thread in this forum and i hope that i find help.
I have developed an application with vb.net which send queries of search engines as google,yahoo,altavista ... and then use the result pages to other things.
This method work successfully with google and yahoo but i find problems with altavista,alltheweb and excite:the pages returned don't contain the same text of souces codes of those pages,and i don't understand why ?
this is the code that i use:
Dim url2 As String = "http://www.altavista.com/web/results?itag=ody"
url2 += "&kgs=1&kls=0"
url2 += "&q="
For k = 0 To keyword.Length - 1
url2 += keyword(k)
'url2 += "+"
Next
url2 += "&stq="
url2 += (ncount * 10).ToString()
Dim webc As New System.Net.WebClient
Dim streemr As New System.IO.StreamReader(webc.OpenRead(url2)) 'String.Format("http://www.google.com/search?hl=en&q={0}&btnG=Google+Search", keyword)))
Dim pagestr As String = streemr.ReadToEnd()
streemr.Dispose()
webc.Dispose()

'Try

' 'Instanciation du StreamWriter avec passage du nom du fichier
' Dim monStreamWriter As StreamWriter = New StreamWriter("C:\Documents and Settings\nx9030\Mes documents\Visual Studio 2005\Projects\WindowsApplication6\WindowsApplication6\bin\Debug\test.txt")

' 'Ecriture du texte dans votre fichier
' monStreamWriter.WriteLine(pagestr)

' 'Fermeture du StreamWriter (Trés important)
' monStreamWriter.Close()

'Catch ex As Exception

' 'Code exécuté en cas d'exception
' MsgBox(ex.Message)

'End Try


when i save the first page for exemple the document text don't contain all data which exist in the source code of this page.
Please help.Thank you