Answers for "php ping page every 5 seconds"

PHP
1

php ping time

<?php
$ip_address = '123.456.789.0'; // IP address you'd like to ping.
exec("ping -c 1 " . $ip_address . " | head -n 2 | tail -n 1 | awk '{print $7}'", $ping_time);
print $ping_time[0]; // First item in array, since exec returns an array.
?>
Posted by: Guest on February-18-2020

Code answers related to "php ping page every 5 seconds"

Browse Popular Code Answers by Language