网页源代码获得 VC代码

	//首先在头文件中包含  #include <AFXINET.H>

	CInternetSession session; 

	CHttpFile *pF=(CHttpFile *)session.OpenURL("http://www.cnblogs.com/VCdog/archive/2011/10/15/2212863.html");

	CString strTempData;

	CString strData;

	while (pF->ReadString(strTempData))

	{

		strData+="\r\n";

		strData+=strTempData;

	}

	AfxMessageBox(strData);//显示网页源代码

	session.Close();	   //关闭会话

  

你可能感兴趣的:(源代码)