Hey all,

I got a few sites and looking to combine them into one. I'm basically thinking of making this "one" a mini-search engine for my sites. Because my sites are optimized for search engines, my links are pretty detailed. Thus, I was thinking of just indexing the links and searching these links for keywords upon a search.

While searching the big G for a link extractor, I found a pretty useful code (which I can't use for some reason). It returns nothing. Can someone look over it to find what's wrong or maybe supply me with another simmilar one that will hopefully help? (just need links of a page).

PHP Code:
// This script will extract all the hyperlinks from a given web page
// To use this script, you must provide a link back to www.WAY2WEB.net
// Thanks!
// (C) 2007 - Anthony Eden | www.WAY2WEB.net

function hyperlinkextract($s1,$s2,$s){

$pos1 strpos($scheck,$s1);
$pos2 strpos(substr($scheck,$pos1+$L1),$s2);
  } while ((

$content = @get_file_contents('http://www.way2web.net/');
$myarray hyperlinkextract("href=\"","\"",$content);

// Process all the links
foreach($myarray as $key => $val) {
"<br />".$val."\n";