I use this method of receiving goods, but because it allows you to receive only 200 products at a time, you have to use the same code again, only manually prescribe an offset (offset) of 200, etc., it takes a huge amount of time with a large group. How can I optimize the code so that all the products can be parsed without my participation in the offset?
$h = file_get_contents("https://api.vk.com/method/market.get?owner_id=-$group&offset=$offset&count=200&access_token=$token&v=5.59"); $tov = $array['response']['count']; //получаю общее кол-во товаров. $array = json_decode($h,true);