Télécharger des logiciels Windows, Mac, Linux, Palm, Pocket PC, Mobile, Jeux, scripts PHP, script ASP, scripts CGI, scripts PERL. Télécharger des cours, des wallpapers, des curseurs, des gifs animés, des fonds d'écran, fonds d'écrans, des textures, des icônes, des dessins. Gratuiciels, freeware, shareware, démonstration, gratuit.
Faites le plein de téléchargements !
Télécharger des logiciels pour WindowsTélécharger des logiciels pour MacintoshTélécharger des logiciels pour LinuxTélécharger des logiciels pour PalmTélécharger des logiciels pour Pocket PCTélécharger sonnerie, jeux java, logo, image, vidéo et musique pour téléphone mobileTélécharger fond d'écran, wallpaper, gif animé, icône, curseur, dessin, photo, image et smiley gratuitTélécharger scripts PHP, ASP, ASP.NET, CGI-PERL, Javascript, Python, Flash, C, C++, DHTML, XML et CFM gratuitTélécharger cours gratuit et tutoriauxForumsShopping, comparateur de prix et achat en ligne
 
Télécharger le script 404Handler - Toocharger.com.
l►► Télécharger 404Handler v1.0. 404Handler emregistrera les erreurs 404 sur votre site et vous enverra un email avec les détails. Vous pouvez choisir de recevoir les emails suivant trois niveaux. Script 404handler.
Scripts > PHP > Gestion de fichiers > Gestion des erreurs > 404Handler

Scripts PHP, ASP, Flash, CGI-PERL, Javascript, ASP.NET, Python, C, C++, DHTML, XML et CFM

SCRIPT 404HANDLER v 1.0

 

Script  404Handler
Agrandir Cliquez pour agrandir
404Handler emregistrera les erreurs 404 sur votre site et vous enverra un email avec les détails.

Vous pouvez choisir de recevoir les emails suivant trois niveaux : pas d'email, recevoir un email seulement si les erreurs sont à partir d'un lien de vos pages, ou envoi d'email si l'erreur se trouve sur un autre site, avec l'emplacement de la page.

  • Ce script ne fonctionne pas sur votre serveur ? Consultez notre aide.
  • Une
    Télécharger

CODE SOURCE (imprimer) :
  1. <?php
  2. error_reporting(E_ALL ^ E_NOTICE);
  3.  
  4. # 404.php - Last updated 3/1/2002, initially released 8/10/2000
  5. # Trap 404 errors and mail a notice to the webmaster
  6. # Now requires PHP4
  7. # Copyright 2000-2002 shaun@shat.net under the GPL v2+
  8.  
  9. # Set these variables to configure the script:
  10.  
  11. # Set $domain to your domain name (no www)
  12. $domain = "shat.net";
  13.  
  14. # Set $docroot to the URL of the directory which contains your
  15. # .htaccess file. Don't include trailing slash.
  16. $docroot = "http://www.shat.net";
  17.  
  18. # Font face you'd like to use on the 404 page
  19. $fontface = "Verdana";
  20.  
  21. # Font size you'd like to use on the 404 page
  22. $fontsize = "2";
  23.  
  24. # Background color of the 404 page (default is white)
  25. $bgcolor = "#ffffff";
  26.  
  27. # Text color you'd like to use on the 404 page (default is black)
  28. $textcolor = "#000000";
  29.  
  30. # This script is capable of mailing the details of each 404 error
  31. # to the webmaster. Use the $reportlevel variable to control when
  32. # you receive these reports.
  33. #
  34. # 0 = don't use the email capabilities
  35. # 1 = send email only if the error's referer contains your domain name
  36. # (i.e. the 404 was generated by a broken link on your site)
  37. # 2 = send email any time a 404 error is generated (useful for tracking
  38. # broken links at other sites which link to you)
  39.  
  40. $reportlevel = 2;
  41.  
  42. # Set $emailaddress to the email address of whoever should be
  43. # notified of 404 errors. Don't escape the @ symbol.
  44. # You can leave this unassigned if you're not using email features.
  45.  
  46. $emailaddress = "you@example.com";
  47.  
  48. #
  49. #Configuration ends here!
  50. #
  51.  
  52. #Until I rewrite my scripts, this will suffice for bg-compatibility;
  53. if(phpversion() >= "4.2.0"){
  54. extract($_POST);
  55. extract($_SERVER);
  56. extract($_ENV);
  57. }
  58. # The print_details function is what prints the 404 error to
  59. # the visitor.
  60.  
  61. function print_details(){
  62. # Request access to the global variables we need
  63. global $fontface, $fontsize, $docroot, $REQUEST_URI, $reportlevel;
  64. global $bgcolor, $textcolor;
  65.  
  66. # Print the 404 error in web format
  67. echo <<<EOT
  68. <html><head><title>404 Not Found</title></head>
  69. <body bgcolor="$bgcolor" text="$textcolor">
  70. <b><h1>404 Not Found</h1></b>
  71. <p><font face="$fontface" size="$fontsize">
  72. We're sorry. The page you requested, $docroot$REQUEST_URI, doesn't exist
  73. on this server.</font></p>
  74. EOT;
  75.  
  76. # If an email report is being generated, let the visitor know:
  77. if ($reportlevel != 0){
  78. echo "<p><font face="$fontface" size="$fontsize">";
  79. echo "The details of this error have automatically been mailed to the webmaster.";
  80. }
  81. return;
  82. }
  83.  
  84.  
  85. # The send_email function sends the details of the 404 error to the
  86. # webmaster.
  87.  
  88. function send_email(){
  89. # Request access to the global variables we need
  90. global $REQUEST_URI, $HTTP_REFERER, $emailaddress, $REMOTE_ADDR, $docroot;
  91.  
  92. # Build the $errortime variable to contain the date/time of the error.
  93. $errortime = (date("d M Y h:m:s"));
  94.  
  95. # Create the body of the email message
  96. $message .= "404 Error ReportnnA 404 error was encountered by $REMOTE_ADDR";
  97. $message .= " on $errortime.nn";
  98. $message .= "The URI which generated the error is: n$docroot$REQUEST_URInn";
  99. $message .= "The referring page was:n$HTTP_REFERERnn";
  100.  
  101. # Send the mail message. This assumes mail() will work on your system!
  102. $headers = "From: $emailaddressnDate: $errortime -0600n";
  103. $subject = "404 Error: $docroot$REQUEST_URI";
  104. mail($emailaddress, $subject, $message, $headers);
  105. return;
  106. }
  107.  
  108. # Done with function declarations. Main function begins here.
  109. header("404 Not Found");
  110. # Send a 404 error to the user's browser
  111. print_details();
  112.  
  113. # See whether or not we should send an email report. If so, do it.
  114. if ($reportlevel != 0)
  115. if ($reportlevel == 1) {
  116. if (eregi($domain,$HTTP_REFERER))
  117. send_email(); }
  118. else
  119. send_email();
  120. # Close up the HTML tags
  121. echo "</body></html>";
  122.  
  123. ?>

Partager

 Auteur shaun
 Site web de l'éditeur
 Date de publication 04/08/2008
 Langue anglais
 Type de licence gratuit
 Licence -
 Bases de données Aucune
 Téléchargements total 537
 Téléchargements ce mois 1

Note des utilisateurs

-/10

Fonctionnalités
Blank
Interface
Blank
Stabilité
Blank
Installation
Blank
Rapport qualité/prix
Blank
Avis général
Blank
Nbre d'avis : 0

Blank



Blank


Il n'y a pas d'avis enregistrés pour le moment, vous pouvez enregistrer le vôtre.

Copyright © 2004-2012 Toocharger.com. Tous droits réservés.