tags:

views:

127

answers:

2

Snoopy is a PHP class that provides the functionality of a web-browser. Is there anything that does the same in C#? I'm having lots of trouble with handling cookies, etc.

+1  A: 

What about Snoopy do you need? There is a WebBrowser Class in C#

You don't specify what about cookies are giving you problems, so this is the best I can do for now for that part:

Dinah
A: 

The simplest thing would be HttpWebRequest - you create one like this:

HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://www.example.com/");
//set request properties

//get response
HttpWebResponse response = (HttpWebResponse)request.GetResponse();

And you can then set headers, cookies etc. You could write your own wrapper class to give it an interface similar to Snoopy.

Lee