returns all links from given url: "; $c = file_get_contents("http://$url"); $c = explode("href=", $c); foreach($c as $line) { $line = ereg_replace(">.*", "", $line); $line = strip_tags($line); $line = str_replace(">", "", $line); $line = str_replace("\"", "", $line); $line = str_replace("'", "", $line); $tp[] = "$line"; } sort($tp); $tp = array_unique($tp); foreach($tp as $final) { if ($final !== "/") { if (ereg("http", $final)) { $final = str_replace("http:/", "", $final); print "$final
\n"; } else{ print "$final
\n"; } } } ?>