Actually fsockopen won't work because it uses tcp,udp,ssl or tls protocols and an actual ping (echo) is icmp.
Thus the need for socket functions (socket_create, etc...) using sock_raw with icmp. The problem is the creation of the ping packet (header and body with correct flags) and the reading of the response.
As a side note once you have the ping done you are almost finished with a traceroute as well.
Am still working on it though. Can't find any good info on creating a ping (echo) packet. grrrr.
chuck