PHP API issue only using one API rather than all that is stored in DB
i spent hours working on this to release to public but this one issue has me confused it will only send to 1 API
i spent hours working on this to release to public but this one issue has me confused it will only send to 1 API
PHP Code
<?php
$insertLogSQL = $odb -> prepare("INSERT INTO `logs` VALUES (NULL, :user, :ip, :port, :time, :method, UNIX_TIMESTAMP(), '0')");
$insertLogSQL -> execute(array(':user' => $_SESSION['username'], ':ip' => $host, ':port' => $port, ':time' => $time, ':method' => $method));
$SQLSelectAPI = $odb -> query("SELECT `api` FROM `api` ORDER BY RAND () LIMIT 1");
$SQLSelectAPI2 = $odb -> query("SELECT `api` FROM `api` ORDER BY RAND () LIMIT 2");
while ($show = $SQLSelectAPI -> fetch(PDO::FETCH_ASSOC))
{
$arrayFind = array('[host]', '[port]', '[time]', '[method]');
$arrayReplace = array($host, $port, $time, $method);
$APILink = $show['api'];
$APILink = str_replace($arrayFind, $arrayReplace, $APILink);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $APILink);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 3);
curl_exec($ch);
curl_close($ch);
}


![[Image: 4YPLYme.gif]](https://i.imgur.com/4YPLYme.gif)