首页 新闻 会员 周边 捐助

程序中如何通过代理服务器访问

0
[已关闭问题] 关闭于 2008-02-02 05:21
程序中通过webclient来获取web页面内容: &nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim &nbsp; MyClient &nbsp; As &nbsp; New &nbsp; System.Net.WebClient <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim &nbsp; Urlstr &nbsp; As &nbsp; String="http://www.sina.com.cn" &nbsp; &nbsp; '页面地址 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim &nbsp; response &nbsp; As &nbsp; System.IO.Stream <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Dim &nbsp; SrReadToEnd &nbsp; As &nbsp; System.IO.StreamReader <BR>&nbsp; <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; response &nbsp; = &nbsp; MyClient.OpenRead(Urlstr) <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SrReadToEnd &nbsp; = &nbsp; New &nbsp; System.IO.StreamReader(response, &nbsp; System.Text.Encoding.Default) <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; While &nbsp; SrReadToEnd.Peek &nbsp; &lt;&gt; &nbsp; -1 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '遍历网页内容 <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; While <BR>现在如果要通过代理服务器访问的话,该怎么搞?感谢各位大侠指教!
cloudgamer的主页 cloudgamer | 菜鸟二级 | 园豆:280
提问于:2008-01-22 20:07
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册