gethostbyname

gethostbyname()函数说明——用域名或主机名获取IP地址     包含头文件     #include <netdb.h>     #include <sys/socket.h>     函数原型     struct hostent *gethostbyname(const char *name);     这个函数的传入值是域名或者主机名,例如"www.google.cn"等等。传
相关文章
相关标签/搜索