$i = 0;
while ($i < 5) {
$query = "SELECT SQL_NO_CACHE DISTINCT(`url`) FROM `str` WHERE `parsed` = 0 LIMIT 100";
$result = mysqli_query($link, $query) or die('Не могу взять из базы url '.mysqli_error($link));
$rows = mysqli_fetch_all($result, MYSQLI_ASSOC);
if (!$rows) break;
$i++;
foreach ($rows as $row) {
$url = $row['url'];
$AC->request($url, 'GET', NULL, NULL, NULL);
}
}