WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Create MRTG Graphic from rrd database (Need MRTG and RRDTool installed).
Categories : PHP, Network, Graphics Update Picture
- anand-
Date : Dec 11th 2000
Grade : 3 of 5 (graded 4 times)
Viewed : 8339
File : No file for this code example.
Images : No Images for this code example.
Search : More code by - anand-
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

<?

/*
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