socket抓取网页

2020-12-06 00:52

阅读:625

标签: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 


mamicode.com,搜素材


mamicode.com,搜素材


mamicode.com,搜素材



socket抓取网页,搜素材,soscw.com

socket抓取网页

标签:blog   http   os   文件   io   2014   

原文地址:http://blog.csdn.net/aspnet_lyc/article/details/24700059


评论


亲,登录后才可以留言!