I am developing a application in which i need to get images from a search engine. there are many choices to do that google,yahoo, bing etc. I chose bing simply because microsoft provides tight integration with bing and it offers more functionality to developers. So after searching some more i learned how to use this service in my application. Created a key and added web service reference in my solution.
the sample code to get images from the internet is written below.
Try
ListBox1.Items.Clear()
Dim service As New LiveSearchPortTypeClient
Dim request As New BingService.SearchRequest
With request
.Query = TextBox1.Text
.AppId = "please fill your app id here"
.Sources = New BingService.SourceType() {BingService.SourceType.Image}
End With
Dim response As BingService.SearchResponse = service.Search(request)
For Each thumburl As BingService.ImageResult In presponse.Image.Results
ListBox1.Items.Add(thumburl.Thumbnail.Url)
ListBox1.Items.Add(thumburl.MediaUrl)
Next
Catch ex As Exception
End Try
Now i come to the point, i want to perform a advanced search.
I want to search image using these parameters
>A pre defined size of images
>Search on a particular site
But i cant figure out how to do that, after a lot of searching i came up with this link here
http://msdn.microsoft.com/en-us/library/dd560913.aspx
I am unable to use it. If i use it no results are returned.
Besides this article i cannot find any useful information in the form of a working sample or anything.
Can someone help me with this........