本文介绍了以编程方式确定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通过网址
发布评论