Function IsConnect:bool;
var
info: WSADATA;
sin: sockaddr_in;
sHwnd: integer;
begin
WSAStartup(makeword(1,1),info);
sHwnd :=Socket(AF_INET, SOCK_STREAM, 0);
sin.sin_family:=AF_INET;
sin.sin_port:=htons(80);
sin.sin_addr.S_addr:=inet_addr('134.170.188.221');
if connect(sHwnd, sin, sizeof(sin)) = SOCKET_ERROR then begin
result :=false;
end else begin
result :=true;
end;
Closesocket(sHwnd);
WSACleanup;
end;