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 :: General error: 1215 Cannot add foreign key constraint laravel 
Php :: CAPTURAR URL PHP 
Php :: substr() php 
Php :: php preg_match special characters 
Php :: carbon now format 
Php :: php add string inside string at position 
Php :: Connecting to the database using mysqli 
Php :: laravel collection tojson 
Php :: symfony get current datetime 
Php :: increament single column laravel current value + 1 
Php :: php get browser 
Php :: laravel session forget 
Php :: php print top n of array 
Php :: regex for email php 
Php :: sleep function in php 
Php :: TreeBuilder::getRootNode()" before creating the root node is not supported, migrate to the new constructor signature instead. 
Php :: php implode as key value of object 
Php :: php echo and array to consle 
Php :: laravel php short if 
Php :: php right characters 
Php :: mkdir() permission denied laravel 
Php :: php explode by tab 
Php :: laravel migration on delete set null 
Php :: how to fetch particular css file in wordpress 
Php :: combine array except common ones php 
Php :: php how to convert string to int 
Php :: moodle webservice create user phone2 
Php :: check network connection php 
Php :: teruglopende for loop php 
Php :: laravel with trashed specific 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =