It so happened that in the do while , requests are sent to API Vkontakte API , how to make a pause between these requests?
Requests are sent using file_get_contents
That's all the code
do { $response = file_get_contents("http://api.vk.com/method/likes.getList?type=".$myrow_table_likes["type"]."&owner_id=".$myrow_table_likes["owner_id"]."&item_id=".$myrow_table_likes["item_id"]."&filter=likes"); $resp = json_decode($response, true); if (!in_array($user_uid, $resp['response']['users'])) { echo $myrow_table_likes["id"]."No likes<br>"; } } while($myrow_table_likes = mysql_fetch_array($result_bd_likes));
usleep()- etkifile_get_contentsit is better to specify the context with the connection: close (like so), otherwise you will get an answer in a split second and wait 30 seconds for 30 manna from heaven - BOPOH