Response.Write( ) SearchAmazon() SearchGoogle() SearchEbay() End Sub3.Add the SearchAmazonprocedure
4.Add the SearchGoogleprocedure to the code section: Sub SearchGoogle() This procedure will retrieve and display the first page from google that is contained on epinions.com with the specified search criteria. Epinions.com is a consumer review web site. Response.Write( ————————————————
) Response.Write( Epinions Page Found Using Google:
) Create a Google Search objectDim Search As New Google.GoogleSearchServiceDim strLicense As StringDim strSearchText As StringDim intStart As IntegerDim intMaxResults As Integer set the values to pass to the Google web service set your developer license keystrLicense = YOUR GOOGLE LICENSE KEY Set the search criteria to search the epinions site for the value the user entered in the search text box. strSearchText = site:www.epinions.com & txtSearch.TextintStart = 0intMaxResults = 1 execute the doGoogleSearch method to retrieve the epinions page for the particular product matching the search criteriaDim SearchResult As Google.GoogleSearchResult = _ Search.doGoogleSearch(strLicense, strSearchText, _ intStart, intMaxResults, False, , False, , , ) if no results were returned then exitIf SearchResult.resultElements Is Nothing Then Exit Sub work with the results to retrieve the URL of the epinions page that was returned in the searchDim result As Google.ResultElementDim strURL As StringFor Each result In SearchResult.resultElements write the page to the browserWritePageContentsToBrowser(result.URL) Exit ForNextEnd Sub5.Add the SearchEbayprocedure to the code section: 274Chapter
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Adult Web Hosting services