PHP Coding School

                          

                   


Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.

Ping host measured in microseconds

Problem Solution Example Reference Recommended


You want to ping a host on a given port and record time taken in microseconds.

The following solution uses PHP socket libraries to open a connection, to the given host and port - then just close it again. By obtaining the microseconds before and after, it is able to deduce time taken in microseconds.

Additionally I’ve added functionality to print the epoch, so the timestamp can be obtained.



One Response to “Ping host measured in microseconds”

  1. links for 2007-07-06 Says:

    […] PHP Coding School ยป Ping host measured in microseconds (tags: ping measured microseconds PHP Coding School) Subscribe to techie blogs central by Email […]

Leave a Reply

You must be logged in to post a comment.


Google
 
Failing that - a post search:



Categories: PHP Coding Training PHP Coding Specialist Perl Coding Training Perl Coding Specialist
LDAP Coding Training LDAP Coding Specialist UNIX Coding Training UNIX Coding Specialist Archives


A DarlingRanges.com Site























Associated
Amusing take on PHP
Article on PHP5 and EOL for PHP4