I think you are mixing things up here. 'Connecting to a port' is used with the tcp protocol. It means establishing a connection through a socket. 'ping' and 'traceroute' both use icmp and not tcp. Ping just sends a icmp type 8 packet (echo request) and waits for the other machine to reply. Traceroute works by sending an icmp packet with a ttl of 1, and stores the reply. Then it sends an icmp with a ttl (which is 'time to live' by the way) of 2 and stores the last host in the chain. Then is repeated until the destination host is the same as the host you are tracerouting. This is a very short and probably un-understandable explanation :-) if you don't know about tcp/ip and icmp, so I suggest you read some whitepapers on these protocols and/or examine some source for ping and traceroute. Anyway, the finger protocol is obsolete and no serious admin will leave it working in his/her server. Why do you want to ping your host anyway? If the fsockopen() succeeds, the host is reachable, otherwise the errorcode will be set to 'host unreachable'.