
正则表达式很强大,今天分享的这个经常使用。
$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;
可以用上面这个获取网页的网页标题。
作者:温文曦本文地址:https://www.wxnotes.com/blog/610.html发布于 2021-07-23
文章转载或复制请以超链接形式并注明出处文曦博客
还没有评论,来说两句吧...