MrTV
asked on
c# google search
I get this code in internet and it show
I have this file wsdl.exe on C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
Error 1 The type or namespace name 'GoogleSearchService' could not be found (are you missing a using directive or an assembly reference?) C:\Users\¿¿¿7\AppData\Loca l\Temporar y Projects\googlesearch\Prog ram.cs 22 9 googlesearch
I have this file wsdl.exe on C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin
Error 1 The type or namespace name 'GoogleSearchService' could not be found (are you missing a using directive or an assembly reference?) C:\Users\¿¿¿7\AppData\Loca
// googly.cs
// A Google Web API C# console application.
// Usage: googly.exe <query>
// Copyright (c) 2002, Chris Sells.
// No warranties extended. Use at your own risk.
using System;
class Googly
{
static void Main(string[] args)
{
// Your Google API developer's key.
string googleKey = "insert key here";
// Take the query from the command line.
if (args.Length != 1)
{
Console.WriteLine("Usage: google.exe <query>");
return;
}
string query = args[0];
// Create a Google SOAP client proxy, generated by:
// c:\> wsdl.exe http://api.google.com/GoogleSearch.wsdl
GoogleSearchService googleSearch = new GoogleSearchService();
// Query Google.
GoogleSearchResult results = googleSearch.doGoogleSearch(googleKey,
query, 0, 10, false, "", false, "", "latin1", "latin1");
// No results?
if (results.resultElements == null) return;
// Loop through results.
foreach (ResultElement result in results.resultElements)
{
Console.WriteLine();
Console.WriteLine(result.title);
Console.WriteLine(result.URL);
Console.WriteLine(result.snippet);
Console.WriteLine();
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.