Source for file graphUserAgents.php
Documentation is available at graphUserAgents.php
require_once './../include/version.php';
require_once './../lib/core.php';
include ('jpgraph/jpgraph.php');
include ('jpgraph/jpgraph_pie.php');
$sql = 'select browser, count(id)*100/(select count(*) from phpusertrack_ip) as percent from phpusertrack_ip group by browser order by percent desc limit 10';
$avgs = $db->_query($sql);
// Create the graph. These two calls are always required
$graph = new Graph(500,233);
//$graph->img->SetAntiAliasing();
$graph->SetScale("textlin");
foreach ($avgs as $avg) {
$plot = new PiePlot($data, $xdata);
|