2009年2月16日星期一

VC++代理刷流量——一段优美的托管代码

参考MSDN拼凑出来的代码 没有一行是我写的 但是实现了使用代理访问网页
稍加修饰就能实现刷流量的功能了 但是我不想在写了 没什么意思

#include "stdafx.h"



#using <System.dll>

using namespace System;

using namespace System::IO;

using namespace System::Net;

using namespace System::Text;

int _tmain(int argc_TCHARargv[])

{

    
WebProxyproxyObject gcnew WebProxy"http://121.22.29.182:80/",true );

    
// Create a request for the URL.   

    
WebRequestreq WebRequest::Create"http://hi.baidu.com/sruingking" );

    
req->Proxy proxyObject;

    
// Get the response.

    
HttpWebResponseresponse dynamic_cast<HttpWebResponse^>(req->GetResponse());

    
response->Close();

    
return 0;

}

1 条评论:

  1. 一直很BS托管的C++- -
    ps:JC把评论弄成页面的吧
    在draft.blogger.com里面弄~
    顺便把验证码K掉~

    回复删除