: I wan to check if a user is online, making some kind of "ping" to its IP, is there any function that pings to an specified IP and tells when it is online?
You can use something like
$string = system("/bin/ping -args $host");
and check $string for a postive response. Your args depend on your OS and version of ping.
IMHO this is a Bad Idea(tm) as more and more networks are setup to drop ICMP packets as a security measure (no, we don't need to discuss the validity of why they do this, but the fact is they do 🙂 ).
Depending on who these users actually are, is there perhaps a service or something that you know they are running that you can connect to instead? Just a thought.
Ken Mugrage
kmugrage@kefta.com
PHP Jobs at http://www.kefta.com/job.html