The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
PRTG Graphs
Posted by: blake | April 28, 2008 @ 5:19pm
PHP Code
[
Download
]
<?php /* Bandwidth Usage Graph Script for PRTG (C) Copyright Andrew Whyman (abyssunderground.co.uk) and Blake Buckalew (randomresources.org) Free to use, distribute and modify. */ # EDIT THESE VARIABLES $URL = ''; // URL:port to the local PRTG Web Server without a trailing slash $ID = ''; $WIDTH = 300; $HEIGHT = 160; # END OF VARIABLES header('Content-type: image/gif'); header('Cache-Control: no-cache'); header("Local-Time: ".date("l, F j, Y - H:i:s")." (EST)"); $time = date("Ymd-H"); switch ($_GET['a']) { case 1: # 5 Minutes $m = date("i") - 5; $m = sprintf("%02d", $m); $file = $URL."/graphimg?id=".$ID."&subid=0&width=".$WIDTH."&height=".$HEIGHT."&from=".$time.$m; break; case 2: # 60 Minutes (1 Hour) $minus5 = date("i") - 60; $minus5 = sprintf("%02d", $minus5); $file = $URL."/graphimg?id=".$ID."&subid=1&width=".$WIDTH."&height=".$HEIGHT."&from=".$time.$minus5; break; case 3: # 1440 Minutes (24 Hours) $minus5 = date("i") - 1440; $minus5 = sprintf("%02d", $minus5); $file = $URL."/graphimg?id=".$ID."&subid=2&width=".$WIDTH."&height=".$HEIGHT."&from=".$time.$minus5; break; case 4: # 43200 Minutes (30 Days) $minus5 = date("i") - 43200; $minus5 = sprintf("%02d", $minus5); $file = $URL."/graphimg?id=".$ID."&subid=3&width=".$WIDTH."&height=".$HEIGHT."&from=".$time.$minus5; break; } readfile($file); ?>
Syntax Highlighting
[
Open in new window
]
Author Comments
For Andy
Rating
4.43 / 8
232 Votes
http://codebin.yi.org/158
page generated in 0.00 seconds