$cikti = shell_exec("sudo netstat -an | grep 192.168.1.1:2020 | grep ESTABLISHED | awk '{print $5}' | cut -d: -f1");
echo $cikti;yapinca ekranda aldigim ip adresleri bu sekilde cikiyor. 192.168.1.250 192.168.1.42 192.168.1.36 192.168.1.61Bu IP adreslerini sirayla mysql sorgusuyla sorup detaylari tabloda listelemek istiyorum. Fakat sorun su ki mysql sorgusuna ip'ler teker teker degil toplu sekilde geliyor. IP adreslerini en iyi hangi sekilde teker teker mysql sorgusuna iletebilirim?
Tablo bu sekilde
<table class="listtable" cellspacing="0">
<thead>
<tr>
<th><h3>Username</h3></th>
<th><h3>Channel</h3></th>
<th><h3>IP</h3></th>
<th><h3>Location</h3></th>
<th><h3>User Agent</h3></th>
<th><h3>Date Started</h3></th>
<th><h3>Online Time</h3></th>
<th><h3>Options</h3></th>
</tr>
</thead>
<?php
include('config/mysql.php');
$result = mysql_query("SELECT * FROM connected_clients WHERE ip = $cikti ORDER BY id DESC LIMIT 1");
echo mysql_error();
while ($row = mysql_fetch_array($result)) {
$connection = $row["status"];
$username = $row["user"];
$channel = $row["port"];
$ipaddress = $row["ip"];
$useragent = $row["useragent"];
$start_time = $row["time-in"];
$dateend = $row["time-out"];
$timeonline = get_time_difference($start_time, $end_time);
$bandwidth = $row["bandwidth"];
?>
<tbody>
<tr>
<td><?php echo $username ?></td>
<td><?php echo $channel ?></td>
<td><?php echo $ipaddress ?></td>
<td><?php echo $isp ?></td>
<td><?php echo $useragent ?></td>
<td><?php echo $start_time ?></td>
<td><?php echo $timeonline ?></td>
<td>Delete</td>
<?php } ?>
</tr>
</tbody>
</table>Yardiminiz icin simdiden tesekkürler
