cvs: phpweb /manual add-note.php
| From: | Nuno Lopes | Date: | Thu, 07 Sep 2006 19:25:46 +0000 |
| Subject: | cvs: phpweb /manual add-note.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-32387@lists.php.net to get a copy of this message | ||
nlopess Thu Sep 7 19:25:46 2006 UTC
Modified files:
/phpweb/manual add-note.php
Log:
when failing because of a spam blacklisting print a link to a dns lookup tool
http://cvs.php.net/viewvc.cgi/phpweb/manual/add-note.php?r1=1.70&r2=1.71&diff_format=u
Index: phpweb/manual/add-note.php
diff -u phpweb/manual/add-note.php:1.70 phpweb/manual/add-note.php:1.71
--- phpweb/manual/add-note.php:1.70 Wed Jul 5 15:51:45 2006
+++ phpweb/manual/add-note.php Thu Sep 7 19:25:46 2006
@@ -1,5 +1,8 @@
<?php
-// $Id: add-note.php,v 1.70 2006/07/05 15:51:45 nlopess Exp $
+// $Id: add-note.php,v 1.71 2006/09/07 19:25:46 nlopess Exp $
+
+$ip_spam_lookup_url = 'http://www.dnsstuff.com/tools/ip4r.ch?ip=';
+
$_SERVER['BASE_PAGE'] = 'manual/add-note.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/posttohost.inc';
@@ -107,8 +110,10 @@
if ($result) {
if (strpos($result, '[TOO MANY NOTES]') !== FALSE) {
print "<p class=\"formerror\">As a security precaution, we
only allow a certain number of notes to be submitted per minute. At this time, this number has been
exceeded. Please re-submit your note in about a minute.</p>";
- } else if (strpos($result, '[SPAMMER]') !== FALSE) {
- print '<p class="formerror">Your IP is listed in one of the
spammers lists we use. If you think this is an error, please contact the <a href="mailto:webmaster@php.net">webmaster</a>.</p>';
+ } else if (($pos = strpos($result, '[SPAMMER]')) !== FALSE) {
+ $ip = trim(substr($result, $pos+9));
+ $spam_url = $ip_spam_lookup_url . $ip;
+ print '<p class="formerror">Your IP is listed in one of the
spammers lists we use, which aren\'t controlled by us. More information is available at <a
href="'.$spam_url.'">'.$spam_url.'</a>. If the problem
persists, please contact the <a href="mailto:webmaster@php.net">webmaster</a>.</p>';
} else if (strpos($result, '[SPAM WORD]') !== FALSE) {
echo '<p class="formerror">Your note contains a prohibited
(usually SPAM) word. Please remove it and try again.</p>';
} else if (strpos($result, '[CLOSED]') !== FALSE) {