Nothing is worse than entering repetitive, monotonous commands into a router to accomplish a simple task. By using PHPTelnet we can create a script that will make use of a web form to provision (create pvc or a Private Virtual Circuit) DSL customers in a Cisco router. The script will also write to a log file for security and troubleshooting purposes. This script could be used for many other tasks as well as it is very easy to modify.
NOTE: Depending on your setup, you may need to make modifications to the script.

First, I will focus on the PHP script, and then the web form.
The first part of the script will call in the PHPTelnet.php file. And grab the variables from our web form with the POST method.
require_once "PHPTelnet.php";
$telnet = new PHPTelnet();
$vpi = $_POST['VPI'];
$vci = $_POST['VCI'];
$spd = $_POST['SPD'];
-
require_once "PHPTelnet.php";
-
-
$telnet = new PHPTelnet();
-
-
$vpi = $_POST[‘VPI’];
-
$vci = $_POST[‘VCI’];
-
$spd = $_POST[‘SPD’];
This next section deals with logging the requests to a file named ‘log.txt’. Make sure you manually create the file first.
//Log actions to file
$logfile="log.txt";
$fh = fopen($logfile, 'a') or die("ERROR: can't open file");
$stringData = $_SERVER['REMOTE_ADDR']." added ".$vpi."/".$vci." ".date("m-d-y.h:i")."\n";
fwrite($fh, $stringData);
fclose($fh);
-
//Log actions to file
-
$logfile="log.txt";
-
$fh =
fopen($logfile,
‘a’) or
die("<br />ERROR: can’t open file");
-
$stringData =
$_SERVER[‘REMOTE_ADDR’].
" added ".
$vpi.
"/".
$vci.
" ".
date("m-d-y.h:i").
"\n";
-
-
Initiate the connection. Make sure to modify the IP address, username, and password.
Read the rest of this entry …
Monitoring your website on a shared host is vital to the well being of your existence on the internet. There are several online services that will do this for you in exchange for a small price. While they may be a bit more accurate, I would like to share with you how to use RRDTool to monitor your website’s response time yourself.

image via rrdwiki (didn’t use mine because it hasn’t completed a full cycle yet.)
NOTE: I am using Ubuntu based Linux Mint. This process should be the same on other Debian based distributions. If you are not running a Debian based distribution, you may have to modify some paths to the rrdtool executable. Some of this procedure has been taken from the rrdwiki.
The first step is to install RRDTool:
sudo apt-get install rrdtool
-
sudo apt-get install rrdtool
Read the rest of this entry …
original image by Just Taken Pics
Lets face it, no one likes performing manual backups. Often if monotonous tasks are not automated in some way (which they should be, that is why computers were invented) they will be forgotten and not performed regularly.
By using Linux wget and cron, we can incrementally backup websites and write a log file for each day. This will save time and network traffic.
This post features the same method I use to backup Hackosis on a daily basis.
Next, cd ~ into your home directory, or the location were you will be putting the website backup. create a new text file — touch websitebackup.sh. If you are backing up multiple websites, you may wish to name the file specific to the website you are backing up to avoid confusion.
Now execute chmod u+x websitebackup.sh to give the file execute permissions.
Contents of websitebackup.sh. Replace italics respectively:
Read the rest of this entry …

Xenu’s Link Sleuth scans your web site for broken links. You can easily exclude URLs and also specify what should be treated as an internal link.
From the site:
Xenu’s Link Sleuth (TM) checks Web sites for broken links. Link verification is done on “normal” links, images, frames, plug-ins, backgrounds, local image maps, style sheets, scripts and java applets. It displays a continously updated list of URLs which you can sort by different criteria. A report can be produced at any time.
Additional features:
- Simple, no-frills user-interface
- Can re-check broken links (useful for temporary network errors)
- Simple report format, can also be e-mailed
- Executable file smaller than 1MB
- Supports SSL websites (”https:// “)
- Partial testing of ftp and gopher sites
- Detects and reports redirected URLs
- Site Map
Windows only, but runs fine under wine on Ubuntu 7.10 here.
Xenu Link Sleuth Screenshot:

More Information and Download — Xenu Link Sleuth