Home > Backend Development > PHP Tutorial > PHP implements ping

PHP implements ping

高洛峰
Release: 2023-03-02 20:26:02
Original
1500 people have browsed it

<?php
// created by joe lumbroso 
// see some other good php3 scripts 
// goto http://www.dtheatre.com/scripts
echo &#39;<font color=\&#39;red\&#39;><blink><b>Pinging</b></blink></font><br>&#39;; 
$to_ping = &#39;dtheatre.com&#39;; 
$count = 3; 
$psize = 65; 
echo &#39; Please be patient, this can take a few moments...\n<br><br>&#39;; 
flush();
while (1) { 
?> 
<pre class="brush:php;toolbar:false"> 
<? 
exec(&#39;ping -c $count -s $psize $to_ping&#39;, $list); 
for ($i=0;$i < count($list);$i ) { 
print $list[$i].&#39;\n&#39;; 
} 
?> 
Copy after login


Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template