“ping” in PHP

May 13, 2006 § Leave a comment

Get your pinging result by PHP like this way:

—————————————–

—————————————–

I got this result:

—————————————-
Array
(
[0] => PING http://www.l.google.com (64.233.189.104) 56(84) bytes of data.
[1] => 64 bytes from 64.233.189.104: icmp_seq=0 ttl=245 time=608 ms
[2] => 64 bytes from 64.233.189.104: icmp_seq=1 ttl=245 time=519 ms
[3] =>
[4] => — http://www.l.google.com ping statistics —
[5] => 2 packets transmitted, 2 received, 0% packet loss, time 2755ms
[6] => rtt min/avg/max/mdev = 519.180/563.682/608.185/44.508 ms, pipe 2
)
—————————————-

Someones asked me this type of questions( related to checking connectivity by PHP). This one is my solution for now.

Regards,
[Rupom]

Advertisements

Tagged: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading “ping” in PHP at Rupom Here.

meta

%d bloggers like this: