PHP Classes

File: plugins.php

Recommend this page to a friend!
  Classes of Piotr Malinski   Detector   plugins.php   Download  
File: plugins.php
Role: Auxiliary script
Content type: text/plain
Description: detector script
Class: Detector
Detect browser plug-ins and resolution using AJAX
Author: By
Last change:
Date: 18 years ago
Size: 751 bytes
 

Contents

Class file image Download
<?PHP
require_once("xajax.inc.php");
$xajax = new xajax();
$xajax->registerFunction("plugins");

function
plugins($plugins, $screen)
        {
   
file_put_contents('plugins.txt', $plugins);
   
file_put_contents('screen.txt', $screen);
   
$objResponse = new xajaxResponse();
    return
$objResponse->getXML();
        }

$xajax->processRequests();
?>

<html><head>
<?php
 $xajax
->printJavascript();
?>
<SCRIPT LANGUAGE="JavaScript">
var num_of_plugins = navigator.plugins.length;
var z = '';
var screen = screen.width+"*"+screen.height;
for (var i=0; i < num_of_plugins; i++) {
   var list_number=i+1;
   z = z+ navigator.plugins[i].name+"___" + navigator.plugins[i].filename + "|||";
   }
</SCRIPT></head><body onload="xajax_plugins(z, screen);"></body></html>