Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2011-05-02 07:09
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 />";
}

?>