Merhaba,
<?php
$ipList = [
'4.4.4.4',
'8.8.8.8',
'123.123.123.123',
'127.0.0.1'
];
foreach ($ipList as $ip) {
exec("/bin/ping -c 2 $ip", $output, $status);
?>
<p style="color:<?= $status ? 'red' : 'green' ?>"><?= $ip ?><p>
<?php
if($status){
// ip pasif
$passiveIps[] = $ip;
}else{
//ip aktif
$activeIps[] = $ip;
}
}
echo '<h2>AKtifler</h2>';
print_r($activeIps);Seklinde iplere ping atarak kontrol saglayabilirsiniz. Bu sekilde kontrol biraz uzun surebiliyor. Bunun yerine tek tek kontrol saglamasi icin ajax ile bir ornek de hazirladim. Ornege
http://www.filedropper.com/ipcekici linkinden ulasabilirsiniz.
hocam bunu nasıl kullanacağımı bi anlatıver