网站seo查阅 (网站seo信息查询)
杭州休闲
05-05
阅读:40
评论:0
![](/gg/hf11.gif)
输入一个网站URL,以查询其SEO相关信息。
loadHTML($content);// 获取网站标题$title = $dom->getElementsByTagName('title')->item(0)->nodeValue;// 获取网站描述$meta_description = $dom->getElementsByTagName('meta')->item(0)->getAttribute('content');// 获取网站关键词$meta_keywords = $dom->getElementsByTagName('meta')->item(1)->getAttribute('content');// 获取网站正文$body_text = $dom->getElementsByTagName('body')->item(0)->nodeValue;// 统计网站字数$word_count = str_word_count($body_text);// 输出查询结果echo "查询结果
";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "属性 | 值 |
---|---|
网站URL | $url |
网站标题 | $title |
网站描述 | $meta_description |
网站关键词 | $meta_keywords |
网站正文 | $body_text |
网站字数 | $word_count |
版权声明
本文仅代表作者观点,不代表杭州桑拿立场。
本文系作者授权发表,未经许可,不得转载。