socket抓取网页
            
            
                    
                        标签:blog   http   os   文件   io   2014   
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
void func()
{
	string url;
	cout > url;
	
	//根据域名获取ip地址
	struct hostent *website_host = NULL;
	website_host = gethostbyname(url.c_str());
	if (website_host == NULL)
	{
		perror("gethostbyname error");
		exit(-1);
	}
	cout h_name h_addrtype h_length h_addr))->s_addr;
	cout 



socket抓取网页,搜素材,soscw.com
socket抓取网页
标签:blog   http   os   文件   io   2014   
原文地址:http://blog.csdn.net/aspnet_lyc/article/details/24700059
                    
             
            
            
            
            
                
                    文章来自:
搜素材网的
编程语言模块,转载请注明文章出处。
                    文章标题:
socket抓取网页
                    文章链接:http://soscw.com/index.php/essay/23365.html                
 
             
            
                                
评论