1 域名转成IP地址
function GetIp(DNS: string): string;
var
Wsa: TWsadata;
begin
WSAStartup($0202, Wsa);
Result := iNet_ntoa(PInAddr(GetHostByName(PAnsichar(DNS))^.h_addr_list^)^);
end;
var
Wsa: TWsadata;
begin
WSAStartup($0202, Wsa);
Result := iNet_ntoa(PInAddr(GetHostByName(PAnsichar(DNS))^.h_addr_list^)^);
end;
2