: Eğer bağlandıktan sonra, gibi bir şey yapmak, bu yüzden - Muhtemelen düzenli ifadeler araştırma istiyor
function crawl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 30); // 30 second timeout
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result = curl_exec ($ch);
curl_close ($ch);
if ($result) {
// top domain links
preg_match_all( '/<a(?:[^>]*)href=\"([^\"]*)\"(?:[^>]*)>(?:[^<]*)<\/a>/is', $result, $output, PREG_SET_ORDER );
foreach( $output as $item ) {
// each link found is output
echo "<pre>";
var_dump($item[0]);
// do your magic here
}
}
}
Eğer kullanım için maç ayarlamak zorunda, ya da bir filtre ile gelip diye, bu sadece, ama tüm bağlantıları bulabilirsiniz.