There is such a task: you need to make a progress bar to perform the function in php. there is such a cycle php
function new() { $url = " "; $html = curl_get($url); $dom = str_get_html($html); for ($i = 0; $i < 14; $i++) { $aux = $dom->find('h3.media-heading a', $i); // ищем название статьи $data['name'][] = $aux->plaintext; // записываем название статьи $data['links'][] = " " . $aux->href; // записывавем ссылку на статью $aux = $dom->find('div.article-info time', $i); // находим дату $str1 = $aux->plaintext; // обрабатываем $str1 = str_replace(' / ', ' ', $str1); // дату $data['date'][] = date("Ymd H:i:s", strtotime($str1)); // записываем дату $aux = $dom->find('span.icon-comments', $i); // находим количество комментариев $data['num_comm'][] = str_replace('"', '', $aux->plaintext); // записываем коичество комментариев $aux = $dom->find('span.icon-views', $i); // находим количество просмотров $data['num_views'][] = str_replace('"', '', $aux->plaintext); // записываем коичество просмотров } for ($i = 0; $i < count($data['links']); $i++) { $html = curl_get($data['links'][$i]); // переходим по $dom = str_get_html($html); // сылкам на $aux = $dom->find('div.pull-left a', 0); // статей и $data['article'][] = $aux->plaintext; // засисываем раздел $aux = $dom->find('div.field-items', 0); // выбираем содржание статьи и $data['content'][] = str_replace(' ', ' ', $aux->plaintext); // записываем } when you click on a button, a modal window should appear in which it is written: data collection has begun, and upon completion it should appear completed. Maybe someone will throw ideas on the implementation of ajax. Thank.