$page = 0;
$URL = "http://example/";
$page = @fopen($URL, "r");
print("Links at $URL
\n");
print("\n");
while(!feof($page)) {
$line = fgets($page, 255);
while(eregi("HREF=\"[^\"]*\"", $line, $match)) {
print("- ");
print($match[0]);
print("
\n");
$replace = ereg_replace("\?", "\?", $match[0]);
$line = ereg_replace($replace, "", $line);
}
}
print("
\n");
fclose($page);
?>