C++經過域名獲取服務器IP

void getrealip(string& strSrc,string& strResult) { strResult = ""; if (strSrc.empty()) { return; } char chIp[INET_ADDRSTRLEN]; struct hostent * phost = gethostbyname(strSrc.c_str()); if (NULL == phost
相關文章
相關標籤/搜索