- file_get_contents: documentation ( source)
- print_r: documentation ( source)
- preg_match_all: documentation ( source)
- strip_tags: documentation ( source)
<?php
$original_file = file_get_contents("http://www.bacciarini.it");
$stripped_file = strip_tags($original_file, "<a>");
preg_match_all("/<a(?:[^>]*)href=\"([^\"]*)\"(?:[^>]*)>(?:[^<]*)<\/a>/is", $stripped_file, $matches);
print_r($matches);