Просмотр поста

.
ValekS
Ей 25

Без Simple HTML DOM. Дальше думаю разберёшься...

Как то так (+/-)
$file = file_get_contents('http://vstup.info/2015/174/i2015i174p212780.html');

preg_match('|<tfoot><tr>(.*?)</tr></tfoot>|is', $file, $tfoot);
preg_match_all('|title="(.*?)"|is', $tfoot['1'], $title);

preg_match('|</tfoot>(.*?)</table>|is', $file, $body);
preg_match_all('|<tr>(.*?)</tr>|is', $body['1'], $human);

$data = array();

foreach ($human['1'] as $value) {
preg_match_all('|<td>(.*?)</td>|is', $value, $val);

$t = $title['1'];
$v = $val['1'];

$data[] = array(
$t['0'] => strip_tags($v['0']), 
$t['1'] => strip_tags($v['1']), 
$t['2'] => strip_tags($v['2']), 
$t['3'] => strip_tags($v['3']),
$t['4'] => strip_tags($v['4']),
$t['5'] => strip_tags($v['5']),
$t['6'] => strip_tags($v['6']),
$t['7'] => strip_tags($v['7']),
$t['8'] => strip_tags($v['8']),
$t['9'] => strip_tags($v['9'])
);
}


echo '<pre>';
print_r($data);
echo '</pre>';
Прикрепленные файлы: