Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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.
?>
Comment

php ping

exec("ping ".$ip, $output, $status);
// $ip: desired ip address
// $output: result messages from the ping
// $status: result status code from the ping
//		0: success
//		1: no response
//		2: other errors
Comment

PREVIOUS NEXT
Code Example
Php :: magento 2 change customers password 
Php :: setup_postdata not working 
Php :: two digits after decimal point in php 
Php :: wordpress get post author link 
Php :: php sort multidimensional array 
Php :: php time how long a function takes 
Php :: php set header content type html 
Php :: get request uri from request laravel 7 
Php :: php to string 
Php :: increment single column laravel 
Php :: laravel created_at migration 
Php :: Script timeout passed, if you want to finish import 
Php :: laravel throw exception with status code 
Php :: php calculate percentage 
Php :: wordpress debug true 
Php :: laravel enum migration 
Php :: insert rows in migrations laravel 
Php :: laravel request validation boolean 
Php :: how to debug php 
Php :: opencart add custom description meta tag using controller file 
Php :: artisan call migrate result 
Php :: Changer le logo Admin WordPress 
Php :: laravel access controller method from another controller 
Php :: php reporting wrong time 
Php :: The blade is not updated with minor changes to the first blade 
Php :: link input button in php 
Php :: Classified script with mobile app laravel 
Php :: img src php wordpress 
Php :: how handle the number with k in laravel balde 
Php :: check php version mac 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =