parse($q); foreach ($files as $i => $file) { $size = File::getSizeByUrl($file['url']); if ($size) { $files[$i]['size'] = $size; $files[$i]['bitrate'] = File::calculateBitrate($files[$i]['size'], $files[$i]['duration']); } else { unset($files[$i]); } } //file_put_contents('dump/html/'. $q .'.html', $parser->getHtml()); //file_put_contents('dump/data/'. $q .'.data', serialize($files)); } else { $files = unserialize(file_get_contents('dump/data/'. $q .'.data')); } $t_end = microtime(true); $files = File::formatData($files); } $completed = array_slice(scandir('dump/data'), 2); include 'tpl/vksearch.php';