developing a Meta Search Engine

(Meta Question Answering System ) in C#

Page 1 of 1

1 Replies - 2077 Views - Last Post: 30 October 2010 - 05:21 AM Rate Topic: -----

#1 Amey_Shenvi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-October 10

developing a Meta Search Engine

Posted 25 October 2010 - 12:40 AM

Hi Everyone :) Greetings :) I am developing a Meta Search Engine (Meta Question Answering System ) in C# ... I am a beginner.

The question from my system will automatically get posted in main search engines, n minimum 10 results will be taken from each search engine and ranked in my system. Can anybody please help me with C# code for doing this plzzzzzzzzzzzzzzzzzzzzzzz. I tried a lot cudnt do 


what i could do with internet help is this :

using System.Net;
...
string HttpPost (string uri, string parameters)
{ 
   // parameters: name1=value1&name2=value2	
   WebRequest webRequest = WebRequest.Create (uri);
   //string ProxyString = 
   //   System.Configuration.ConfigurationManager.AppSettings
   //   [GetConfigKey("proxy")];
   //webRequest.Proxy = new WebProxy (ProxyString, true);
   //Commenting out above required change to App.Config
   webRequest.ContentType = "application/x-www-form-urlencoded";
   webRequest.Method = "POST";
   byte[] bytes = Encoding.ASCII.GetBytes (parameters);
   Stream os = null;
   try
   { // send the Post
      webRequest.ContentLength = bytes.Length;   //Count bytes to send
      os = webRequest.GetRequestStream();
      os.Write (bytes, 0, bytes.Length);         //Send it
   }
   catch (WebException ex)
   {
      MessageBox.Show ( ex.Message, "HttpPost: Request error", 
         MessageBoxButtons.OK, MessageBoxIcon.Error );
   }
   finally
   {
      if (os != null)
      {
         os.Close();
      }
   }
 
   try
   { // get the response
      WebResponse webResponse = webRequest.GetResponse();
      if (webResponse == null) 
         { return null; }
      StreamReader sr = new StreamReader (webResponse.GetResponseStream());
      return sr.ReadToEnd ().Trim ();
   }
   catch (WebException ex)
   {
      MessageBox.Show ( ex.Message, "HttpPost: Response error", 
         MessageBoxButtons.OK, MessageBoxIcon.Error );
   }
   return null;
} // end HttpPost 



but i doubt will it satisfy my needs ? plz help any1 plz

MOD EDIT: When posting code...USE CODE TAGS!!!

:code:

This post has been edited by JackOfAllTrades: 25 October 2010 - 04:39 AM


Is This A Good Question/Topic? 0
  • +

Replies To: developing a Meta Search Engine

#2 Chronicade  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 57
  • Joined: 05-September 09

Re: developing a Meta Search Engine

Posted 30 October 2010 - 05:21 AM

Do you have the correct google post parameters? All WebRequest settings? How do you plan on storing?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1