hi, try this
<?php
$file = '<div class="file">
<img src="prev.php?id=22651" alt="thumb" /><br /><a href="Download.php?id=22651">video 651</a> 8.38 MB
</div>
<div class="file">
<img src="prev.php?id=22651" alt="thumb" /><br /><a href="Download.php?id=22651">video 651</a> 8.38 MB
</div>
<div class="file">
<img src="prev.php?id=22651" alt="thumb" /><br /><a href="Download.php?id=22651">video 651</a> 8.38 MB
</div>';
$chunk = explode('<div class="file">', $file);
//print_r($chunk);
$count = count($chunk);
for ($i=1; $i < $count; $i++)
{
$match_name = preg_match('/">(.*)<\/a>/i', $chunk[$i], $w);
$match_thumb = preg_match('/<img src="(.*)" alt="/i', $chunk[$i], $x);
$match_link = preg_match('/<a href="(.*)">/i', $chunk[$i], $y);
$match_size = preg_match('/<\/a>(.*\n)<\/div>/i', $chunk[$i], $z);
echo "<div class='my_css'>Filename:$w[1]<br />
filesize:".trim($z[1])."<br />
Download link: $y[1]<br />
preview: $x[1]</div>";
}
?>