以编程方式确定CMS通过网址

编程入门 行业动态 更新时间:2024-10-25 02:29:11
本文介绍了以编程方式确定CMS通过网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否有任何其他的方式来从URL检测CMS?如果是的话,是否有o任何其他语言PHP任何可用的API?该网站 whatcms/ 是什么,我心目中的例子;它是如何做检测?

Is there any other way to detect CMS from URL? If yes, is there any available API in PHP o any other language? The site whatcms/ is an example of what i have in mind; how does it do the detection?

推荐答案

您可以检查生成的元标记。大多数CMS有自己的名称和版本广告在那里。

You could check the meta tag for generator. Most CMS have their name and version advertised there.

这是你在标记。

<meta name="generator" content="Joomla! - Open Source Content Management" />

这code会设法找出标签提取内容属性。

This code will try and find the tag to extract the content attribute.

$doc = new DOMDocument(); $doc->loadHTMLFile('joomla'); $xpath = new DOMXPath($doc); $generators = $xpath->query('//html/head/meta[@name="generator"]'); echo $generators->item(0)->getAttribute('content');

这code回声的的Joomla! - 开源内容管理

更多推荐

以编程方式确定CMS通过网址

本文发布于:2023-11-25 17:23:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630663.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:方式   网址   CMS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!