请问一下:如何实现访问url地址,只是想提交一下http网址,并不需要截获数据的

解决方案 »

  1.   

    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(logURL);
                request.Method = "POST";
                request.KeepAlive = true;
                //request.Referer = "http://www.baidu.com";
                request.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1";
                request.ContentType = "application/x-www-form-urlencoded";
                request.AllowAutoRedirect = true;
                request.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */*";
    一些代码而已,后台访问在C#里用了
    using System.Text;
    using System.Net;
    using System.Text.RegularExpressions;
    using System.IO;
    using System.Web;等类 你可以以这些关键词去搜哦~
      

  2.   

    使用 wininet、winhttp 或者用 socket 模拟 http 报文