PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Hamed Afshar   CMS Detector   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: An example usage of the class
Class: CMS Detector
Detect software used by a site analsying its HTML
Author: By
Last change:
Date: 12 years ago
Size: 322 bytes
 

Contents

Class file image Download
<?php
include("CMS_Detector.class.php");

$url="http://www.joomla.org/";

if (
substr($url,0,7)!="http://")
{
    die(
"Invalid URL!");
}
$content=file_get_contents($url);

$apps=CMS_Detector::process($content);
foreach(
$apps as $app)
{
   
$url=CMS_Detector::appToURL($app);
    echo
"<a href='$url'>$app</a>";
    echo
"<br />";
}

?>