• 16-07-2016, 13:52:14
    #1
    Beyler Bizim Girdiğimiz İp Aralıklarına Ping Atacak Bi Php Lazım Aktif Olan İpleri Listelicek Bunu Yapabilecek Varmı
  • 16-07-2016, 15:42:09
    #2
    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.
  • 16-07-2016, 15:42:32
    #3
    http://angryip.org/ işini görecektir üstadım.
  • 16-07-2016, 15:44:51
    #4
    StyleWaR adlı üyeden alıntı: mesajı görüntüle
    http://angryip.org/ işini görecektir üstadım.
    Ben yanlis anlamisim sanirim. Benim paylastigim sey araliktan ziyade elle girilen ipleri kontrol ediyor. Arkadasin paylastigi uygulama daha saglikli olacak gibi duruyor.
  • 16-07-2016, 17:01:30
    #5
    rasit adlı üyeden alıntı: mesajı görüntüle
    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
  • 16-07-2016, 17:44:37
    #6
    pm atiyorum.