I have been trying to find a way to extract all the links on a site and place them on my site. The only problem though is that whenever I try to search for a site, it tells me that there are no links on the site. Here is the code so far.
Quote:
function search() {
global $config,$url;
$filename = "$url";
$handle = fopen($filename, "r");
$read = fread($handle, 100000);
$content = explode("\"", $read);
$result = strpos($content, "http://");
if ($result === false) {
echo "<font size=\"2\" face=\"verdana\">We could not find any links on this page. Please try again!</font>";
} else {
echo "<font size=\"2\" face=\"verdana\"><b>$result</b><br>";
}
}
|
|