|
|
|
<?
/*
Variabel initialization.
*/
$rrdname = "/full/path/to/rrdfile.rrd";
$daygraph = "gifday.gif";
$weekgraph = "gifweek.gif";
$monthgraph= "gifmonth.gif";
$yeargraph = "gifyear.gif";
/* I don't suggest you to modify listing code below. */
$daystart = "-2000m";
$weekstart = "-12000m";
$monthstart = "-2880000";
$yearstart = "-34560000";
gambar($daygraph, $rrdname, $daystart);
echo "<p align='center'><font face='verdana' size='2'><b>Daily graph</b></font>";
echo "<center><img src=images/$rowgraph[2]></center><p>";
gambar($weekgraph, $rrdname, $weekstart);
echo "<p align='center'><font face='verdana' size='2'><b>Weekly graph</b></font>";
echo "<center><img src=images/$rowgraph[3]></center><p>";
gambar($monthgraph, $rrdname, $monthstart);
echo "<p align='center'><font face='verdana' size='2'><b>Monthly graph</b></font>";
echo "<center><img src=images/$rowgraph[4]></center><p>";
gambar($yeargraph,$rrdname,$yearstart);
echo "<p align='center'><font face='verdana' size='2'><b>Yearly graph</b></font>";
echo "<center><img src=images/$rowgraph[5]></center><p>";
function gambar($gif,$rrd, $start)
{
$comm="rrdtool graph images/$gif --alt-y-grid --lazy -c MGRID#ee0000 -c GRID#000000 --
start $start -
-end now DEF:data0=$rrd:ds0:AVERAGE DEF:data1=$rrd:ds1:AVERAGE
\"CDEF:input=data0,8,*\" \"CDEF:output=data1,8,*\" CDEF:ijo=input,100
,GT,input,0,IF AREA:ijo#00BF00:\"Incoming traffic in Bits per second\\l\"
LINE2:output#0000FF:\"Outgoing traffic in Bits per second
\\l\" GPRINT:input:MAX:\"Maximal In\: %9.0lf bits.\" GPRINT:output:MAX:\"Maximal Out\: %9.0lf
bits.\\l\" GPRINT:input:AVERAGE:\"Aver
age In\: %9.0lf bits.\" GPRINT:output:AVERAGE:\"Average Out\: %9.0lf bits.\\l\"
GPRINT:input:LAST:\"Current In\: %9.0lf bits.\" GPRI
NT:output:LAST:\"Current Out\: %9.0lf bits.\\l\"";
exec($comm);
}
?> |
|
| crop and resize image class using gd library function Categories : PHP, PHP Classes, GD image library, Graphics | | | A couple of functions that convert an IP address into its color code and not-color-code. Useful when viewing an apache log with a mysql result grouped by IP Categories : PHP, Graphics, Databases | | | How to display any array in several rows and columns of a table. Not just
in one column or in alternate rows. This example shows a nice color table
generated with PHP, but can be used with any array values(e.g. Database) Categories : Arrays, PHP, Miscellaneous, Beginner Guides, Graphics | | | Class for sending mail with MIME attachments in multipart format using external sendmail, mimencode and zip Categories : Email, Network, PHP, PHP Classes | | | PHP Round Clock - Must have Gif support to use this. Categories : PHP, Date Time, Graphics | | | Create Thumbnails - resize an image - jpeg, jpg, gif, png to the specifed width and height in proportion without loosing out on pixcel quality. Categories : PHP, GD image library, Graphics | | | webcam cam view image ispy browser independant Categories : Graphics, HTML, HTML and PHP, PHP | | | Create images on fly using GD-Image Lib Categories : PHP, Graphics | | | WebServerSpy checks which kind of Webserver is running, Apache, Netscape, Fasttrack, IIS, HTTP-Header, HTTP 1.0, GET, spy, WWW Categories : HTTP, Network, Apache, PHP, Web Servers | | | Random Image Display Categories : PHP, Filesystem, Graphics, HTML and PHP | | | This is a script that list all image files on a given directory, and displays
the thumbnails nicely formated within an HTML table. It also make use of
JavScript to open pop up windows when the users want to see the full photo. Categories : Graphics, PHP, Complete Programs, Java Script | | | PHP Email image generator - hide your email from bots - using the GD Library Categories : PHP, Graphics, GD image library, Beginner Guides | | | Examines the user's computer for open Netbus (the trojan horse) port and reports the conclusion to the user. Categories : Network, PHP | | | Functions for loading images into a MySQL database and displaying them. Categories : Graphics, HTML and PHP, MySQL, PHP, Databases | | | Render TTF Text to PNG. Text message, font, size, rotation, padding, color, background, and transparency can all be defined via URL. Categories : PHP, PHP Classes, Graphics | |
|
|
|