Help! User-agent - how to identify yourself?

T

Thug Passion

Hi,

I've written a type of web spider; now I'd like it to identify itself
to servers it crawls over. I'm using VB.NET 2003, XP Home, and a
(desktop) Windows Forms app.

I'm using the WebClient class to send requess and open read streams.
The couple MSDN articles I've found on setting the UserAgent property
use a WebRequest & WebResponse pair. But they create a request, then
typecast it and set the UserAgent after they've already sent the
request to the server.

How can I identify myself *before* I set out into the web?

Thanks!




WebX = New WebClient
Try
ans = WebX.OpenRead(Site)
str = New System.IO.StreamReader(ans)
Catch ex As Exception
....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top