<?php $site=file_get_contents('http://yandex.ru'); preg_match_all('|<a href="(.*?)">(.*?)</a>|is', $site, $out); print_r($out[2]); ?>