<?php $list = file_get_contents("listan.txt"); $urls = explode("\n",$list); foreach($urls as $url) { $file = file_get_contents($url); $tablestart=strpos($file,"<table>"); $tableslut = strpos($file,"</table>"); $spec=substr($file,$tablestart,$tableslut-$tablestart)."</table>"; } ?> <?php echo $spec; ?>