如何得到 xxx.yeah.net 所指向的 url地址

解决方案 »

  1.   

    url???????
    xxx.yeah.net不就是吗? 要嘛你是说FTP://xxx.yeah.net , HTTP://xxx.yeah.net , TELNET://xxx.yeah.net
      

  2.   

    比如我的 catlovexp.yeah.net 指向 http://218.108.9.63
    如何由 catlovexp.yeah.net 获得 http://218.108.9.63
      

  3.   

    从主机名得到IP地址
    int CGetIPDlg::GetIPAddress(const CString& sHostName, CString& sIPAddress)
    {
    struct hostent FAR *lpHostEnt = gethostbyname (sHostName);if (lpHostEnt == NULL) {
    // An error occurred. 
    sIPAddress = _T("");
    return WSAGetLastError();
    }LPSTR lpAddr = lpHostEnt->h_addr_list[0];
    if (lpAddr) {
    struct in_addr  inAddr;
    memmove (&inAddr, lpAddr, 4);
    sIPAddress = inet_ntoa (inAddr);
    if (sIPAddress.IsEmpty())
    sIPAddress = _T("Not available");