Click here to Skip to main content
15,887,293 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi guys
i need a program to search in google pages and save titles in a txt file

anyone can help me?
Posted

1 solution

You need to use the class System.Net.HttpWebRequest using HTTP request method "GET" (which is the default). Compile-time error will be of the type System.Net.WebRequest though as the run-type will be determined based on URL by the call to the factory method System.Net.WebRequest.Create

See:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^] (see the code sample here).

You need to get response stream and process it. It will return you the HTML file which you can parse and extract the data you need. You also need to learn how to pass a request to Google. You can do it just by experimenting with Google, looking at generated request URLs, etc. By the way, Google search API is now deprecated, to best of my knowledge.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900