🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` function get_url_title($url){ $content=file_get_contents("https://www.jb51.net/"); $pos = strpos($content,'utf-8'); if($pos===false){$content = iconv("gbk","utf-8",$content);} $postb=strpos($content,'<title>')+7; $poste=strpos($content,'</title>'); $length=$poste-$postb; echo substr($content,$postb,$length); } ```