How to Create Your Own Online Bot
- 1). Open your development environment of choice and create a new file to contain your bot.
- 2). Instantiate a URI and place it in memory. Provide the name of the website you'd like your bot to visit as a parameter:
Uri sampleURI = new uri("http://www.SampleWebsite"); - 3). Instantiate a WebRequest object using the sampleURI object as a parameter:
WebRequest sampleWebRequest = HttpWebRequest.Create(sampleURI); - 4). Trigger the ".GetResponse()" method of the WebRequest object to obtain the contents of the target URI.
sampleWebRequest.GetResponse(); - 5). Use the data contained provided by the ".GetResponse()" method as needed. For example, you may wish to scan the contents of the Web page for updates.
- 6). Save your work and test it to ensure it works as expected.
Source...