WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
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 Resources
Web Development Content
Internet Security Software
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
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

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 : PHPLinkRot v1.0 - program which allows users to report broken links on your website just by clicking a button. Works well on custom 404 pages
Categories : PHP, Complete Programs, Debugging, URLs, Site Planning Click here to Update Your Picture
A. Gianotto
Date : Mar 28th 2000
Grade : 2 of 5 (graded 4 times)
Viewed : 11041
File : No file for this code example.
Images : No Images for this code example.
Search : More code by A. Gianotto
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

<?
/*************** PHPLinkRot v 1.0 ***************/
/************************************************/
/* written by A. Gianotto - 3/28/2000 */
/* To find out if this is the latest version */
/* of this script, email snipe@snipe.net, or */
/* visit http://www.snipe.net */
/************************************************/
/* You can see this script in use by going to */
/* http://www.snipe.net/blarginflarn.html */
/* (That page doesn't exist, so you will come */
/* to a custom 404 page which then uses this */
/* program.) */
/************************************************/
/************************************************/
/* PHPLinkRot may be used freely for private */
/* or commercial use. All I ask is that you */
/* don't include it in any collections without */
/* my permission. */
/************************************************/
/************************************************/
/* DESCRIPTION: */
/* This program can be used in */
/* conjunction with a custom 404 page. */
/* */
/* It simply gets the referring URL and prints */
/* a form that allows the user to quickly send */
/* the site administrator notification of the */
/* broken link. It also allows the user to */
/* send their name and email address with the */
/* notification, as well as a short comment, */
/* to allow the site administrator to send the */
/* user the correct URL if they choose to. */
/************************************************/
/************************************************/
/* INSTALLATION: */
/* There is no readme or install file with */
/* script, because it's so easy to install, */
/* you just have to follow the comments in the */
/* first part of the code */
/************************************************/
/************************************************/

// make this point to your header file. rename the file
// and the path to point to the correct file on your server
// If you do not use a header or footer file, simply replace
// the header and footer includes with the proper HTML code
// for your site
include("/usr/home/your-site.com/html/inc/header.inc");

// Enter the website administrators email address here
$adminaddress = "you@your-site.com";

// Enter the company name or site name here
$sitename = "your-site.com";

// Enter the address of your website here
$siteaddress ="http://www.your-site.com";

// Unless you are changing the verbage of the printed message,
// there are no further configurations that need to be done
// past this point, except editing the path to your footer includes

// If you do not use header and footer files, you can just replace
// the include calls with your HTML, but be sure to close the PHP tags
// before and after the HTML, so you don't get parse errors.


IF ($action==""):
?>

<H3>Help Us fight linkrot!!</H3>
<?
$referer = getenv("HTTP_REFERER");
print "<B>$referer</B><BR><BR>";

?>
To report this link broken and help us fight the nasty V.D. of the internet known as Linkrot,
please fill fill out the simple form below.
<BR>
<BR><B>NOTE:</B> We only request your name and email address so that we may notify
you if the page you are looking for has been moved.
<BR><FORM METHOD=POST ACTION="<? echo "$PHP_SELF"; ?>">

<TABLE BORDER="0" CELLSPACING="3" CELLPADDING="3">
<TR>
        <TD VALIGN="TOP"><FONT FACE="Arial, Helvetica, Verdana, Sans Serif" SIZE="-
1">Name:</FONT></TD>
        <TD VALIGN="TOP"><FONT FACE="Arial, Helvetica, Verdana, Sans Serif"
SIZE="3"><INPUT TYPE="text" NAME="name"></FONT></TD>
</TR>
<TR>
        <TD VALIGN="TOP"><FONT FACE="Arial, Helvetica, Verdana, Sans Serif" SIZE="-
1">Email:</FONT></TD>
        <TD VALIGN="TOP"><FONT FACE="Arial, Helvetica, Verdana, Sans Serif"
SIZE="3"><INPUT TYPE="text" NAME="email"></FONT></TD>
</TR>
<TR>
        <TD VALIGN="TOP" COLSPAN="2"><FONT FACE="Arial, Helvetica, Verdana, Sans
Serif" SIZE="-1">Additional Comments:</FONT></TD>
</TR>
<TR>
        <TD VALIGN="TOP" COLSPAN="2"><FONT FACE="Arial, Helvetica, Verdana, Sans
Serif" SIZE="3"><TEXTAREA NAME="comments" ROWS="3"
COLS="30"></TEXTAREA></FONT></TD>
</TR>
<TR>
        <TD VALIGN="TOP" COLSPAN="2"><FONT FACE="Arial, Helvetica, Verdana, Sans
Serif" SIZE="3"><INPUT TYPE="hidden" NAME="url" VALUE="<? echo "$referer"; ?>"><INPUT
TYPE="submit" NAME="action" VALUE="Send"></FONT></TD>
</TR>
</TABLE>

</FORM>
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>


<? include("/usr/home/your-site.com/html/inc/footer.inc");
exit;
ELSEIF ($action="Send"):
mail("$adminaddress","Broken Link on $sitename","$name has reported the following broken
URL:

$url

Additional Comments:
------------------------------------
$comments
------------------------------------

$sitename
$adminaddress
$siteaddress","FROM:$email");
?>
<H3>Thank you!</H3>
We appreciate you taking the time to help us improve our site! If the page you are looking for
still exists on our server, but has been moved, we will email you with it's new location.
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>
        <BR>

<?
ENDIF;
include("/usr/home/your-site.com/html/inc/footer.inc"); ?>

*************************************
End phplinkrot.php3
*************************************
To add this into your HTML to make it work, just create a link to phplinkrot.php3 on your
custom 404 File Not Found page, preferably with text like "report this link broken".
PHPLinkRot does the rest!




PHPRecommend v1.0 - Recommend this page to a friend script written in PHP. Easy to install
Categories : PHP, URLs, Complete Programs, Email, Site Planning
phpDocumentor 1.1.0 - automatic documentation tool for PHP. Generates API documentation in HTML, PDF, and CHM formats with automatic linking, smart inheritance and packaging, very fast and stable. Official website http://www.phpdoc.org
Categories : Complete Programs, Debugging, PHP, Documentation
phpHoo2 (Xhoo using php3/MySQL) is a Yahoo-like link directory. Much like the Open Directory Project (dmoz.org).
Categories : PHP, Complete Programs, Directories, MySQL, URLs
An email validation script that actually checks against the recipient's mail server.
Categories : Email, Complete Programs, PHP, Network, Debugging
phpRecommend v1.2 - UPDATED - recommend this page to a friend script - VERY easy install - now with data logging to text file
Categories : Complete Programs, PHP, Link to Article, URLs, Misc
MyRedirector 1.0 is a Redirector with graphical Statistics
Categories : HTTP, Complete Programs, MySQL, URLs
Gonx URLs - This class is meant to generate URLs for accessing application dynamically generated pages based on parameters passed in the URL.
Categories : PHP, PHP Classes, Navigation, URLs
Dynamic WHERE CLAUSE depending on number of FORM FIELDS
Categories : ODBC, General SQL, PHP, Complete Programs, Databases
Contents Page - a script to build contents pages.
Categories : Complete Programs, PHP, Utilities, Filesystem
An SQL Administration User Interface for the Web
Categories : Databases, PHP, mSQL, Complete Programs
Function to check connection to MySQL and redirect to an error page if an error occurs
Categories : MySQL, PHP, Debugging, Databases
who.php3 - prints a summary of the current activity on the system, including what each user is doing and where they are logged if from. PHP3 functions: exec, ereg System: IRIX 6.3
Categories : Complete Programs, PHP
NNTP NNRP News Newsgroup Discussion
Categories : PHP, Complete Programs
This is a simple photo gallery that reads the image files from multiple directories, and generates a web page styled with CSS1. It opens single auto window to view and print a given image.
Categories : Graphics, Filesystem, PHP, Complete Programs
php jump urls...the best way
Categories : PHP, URLs, Filesystem