本文共 315 字,大约阅读时间需要 1 分钟。
void smtpIp(char * url) { HOSTENT * iphost; char ipconfig[20]; iphost =gethostbyname("tieren.2288.org"); if(iphost!= NULL) { int i = 0; while(iphost->h_addr_list[i]) { char ip[20]; memcpy(&ip, inet_ntoa(*((struct in_addr *)iphost->h_addr_list[i])), 20); printf("%s", ip); memset(ip, '\0', 20); i++; } }int b = 0;
}
转载地址:http://rhojz.baihongyu.com/