Regular expression
Return list
if(isset( $url)){
echo "$url has the following link:
";
$fcontents = file($url);
while(list(,$line)=each($fcontents )){
while(eregi((href[[:space:]]*=[[:space:]]*"?[[:alnum:]:@/._-]+"?)(. *),$line,$regs)){
$regs[1] = eregi_replace((href[[:space:]]*=[[:space:]]*"?)([[:alnum: ]:@/._-]+)("?),"2",$regs[1]);
echo " $regs[1]
";
$line = $regs[ 2];
}
}
}
?>
http://www.bkjia.com/PHPjc/531998.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531998.htmlTechArticleRegular expression returns list if(isset($url)){ echo "$url has the following links: " ; $fcontents = file($url); while(list(,$line)=each($fcontents)){ while(eregi((href[[:space:]]*=[[:space...