日期:2014-05-18  浏览次数:21247 次

C#刷流量的原理,有代码的更好哈
小弟最近想做个刷网站流量的小工具,给朋友刷,但是不知道该怎么做,哪位大大可以给点提示,小弟感激不尽啊,能不能稍微加点代码,留个QQ,邮箱的更好,有机会交流交流

------解决方案--------------------
try
{
Thread.Sleep(1500);
request = (HttpWebRequest)HttpWebRequest.Create(url);
request.Accept = "*/*";
request.UserAgent = "Mozilla/4.0 (MSIE 6.0; Windows NT " + r.Next(99999) + ")";
request.Headers["Accept-Language"] = "zh-cn";
request.Timeout = 60000;

oWebResp = (HttpWebResponse)request.GetResponse();
oStream = new StreamReader(oWebResp.GetResponseStream(), System.Text.Encoding.GetEncoding(encoding));
sResp = oStream.ReadToEnd();
oStream.Close();
return sResp;
}

具体思路就是httpget
根据对方网站的判断规则加上不同的referer啊cookie啊什么什么的
------解决方案--------------------
webrequest不停的发起请求!
C# code


    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
    request.Accept = "*/*";
    HttpWebResponse response = null;
    Stream stream = null;
    StreamReader reader = null;
    try
    {
        response = (HttpWebResponse)request.GetResponse();
        stream = response.GetResponseStream();
        reader = new StreamReader(stream, Encoding.UTF8);
        html = reader.ReadToEnd();//.Replace("\r\n", ""); 
    }
    catch (Exception excpt)
    {
    }