正则表达式很强大,今天分享的这个经常使用。
$url = @$_GET["url"];$info=@file_get_contents($url);preg_match('/<title>(.*?)</title>/',$info,$title);echo $title;$url = @$_GET["url"]; $info=@file_get_contents($url); preg_match('/<title>(.*?)</title>/',$info,$title); echo $title;$url = @$_GET["url"]; $info=@file_get_contents($url); preg_match('/<title>(.*?)</title>/',$info,$title); echo $title;
可以用上面这个获取网页的网页标题。
© 版权声明
THE END
暂无评论内容