Hi all,
I have an issue with a loop as it contains communication between my server and a remote one. If the remote server has an issue then it takes forever to complete the loop and the execution times out.
What it currently is:
$servers = mysql_query("SELECT * FROM server_tab;e where s_enabled = 1 AND s_active= 1;");
$num_rows = mysql_num_rows($servers);
if ($num_rows > 0) {
while ($server_ip = mysql_fetch_array($servers)) {
echo(''.$server_ip['server_name'].': ');
communicationQuery::query($server_ip['ip']);
echo('<br /><br />');
}
}
echo"All communcations completed. Waiting for META refresh...";
}
The process I want:
1) open process
2) complete the query for ip 1
3) store results
4) close process
then repeat for IP 2, 3, 4 and so on.
Any ideas?