May 08
This code is used to get list of all the links in a HTML page!
$file=file_get_contents(”http://groups.google.com/group/filtering-in-Iran/t/ea3859b0a8aefb88″);
$file = preg_replace(’#<\s*script[^>]*?>.*?<\s*/\s*script\s*>#si’, “”, $file);
//echo $file;
preg_match_all(”/(href)\s*=\s*[\’\”]?(([[a-z]{3,5}:\/\/(([.a-zA-Z0-9-])+(:[0-9]+)*))*([+:%\/\?~=&;\\\(\),._ a-zA-Z0-9-]*))(#[.a-zA-Z0-9-]*)?[\’\” ]?(\s*rel\s*=\s*[\’\”]?(nofollow)[\’\”]?)?/i”, $file, $matches);
$match1= $matches[2];
echo”<pre>”;