struct hostent* ht = gethostbyname("www.baidu.com"); printf("IP:%s\ ", inet_ntoa((unsigned int *)ht->h_addr_list));