|
Code php split weblink url |
Monday, January 22, 2007 |
<? $url=\"http://item.mooo.com/\"; if(isset($_POST[\"url\"])){ $url=strtolower($_POST[\"url\"]); $web=file($url); echo\"<ol>\"; for($i=0;$i<count($web);$i++){ $web[$i]=strtolower($web[$i]); $found=0; $r1=split(\"href=\",$web[$i]); if(count($r1)>1)$found=1; if($found==1){ $r2=split(\'[>]\',$r1[1]); $tag=$r2[0]; echo\"<li>\"; if(substr($r2[0],0,4)!=\"http\") echo\"<fontcolor=red>$tag</font>\\n\";elseecho$tag.\"\\n\"; } } echo\"</ol>TotalLine:\".count($web); } echo\"<formaction=\'\'method=post><inputname=urlvalue=\'$url\'size=60> <inputtype=submitvalue=Url></form>\"; ?> |
|
|
|
|
|
Previous Post |
|
Archives |
|
Links |
|
Powered by |
|
|