Re: cvs: php-master-web /entry user-note.php
| From: | Vincent Gevers | Date: | Mon, 16 Jan 2006 16:14:01 +0000 |
| Subject: | Re: cvs: php-master-web /entry user-note.php | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-30376@lists.php.net to get a copy of this message | ||
Hi,
The last time this code was used it only returned the submitting mirror web
server.
I think a fix could be to also post the ip, while posting the user note to
this script.
Vincent
On Monday 16 January 2006 13:44, Nuno Lopes wrote:
> nlopess Mon Jan 16 12:44:44 2006 UTC
>
> Modified files:
> /php-master-web/entry user-note.php
> Log:
> readd the code to show the note submiter IP (now E_NOTICE free), so that
> we can ban the current spammer (I'm getting tired of it)
>
>
> http://cvs.php.net/viewcvs.cgi/php-master-web/entry/user-note.php?r1=1.33&r
>2=1.34&diff_format=u Index: php-master-web/entry/user-note.php
> diff -u php-master-web/entry/user-note.php:1.33
> php-master-web/entry/user-note.php:1.34 ---
> php-master-web/entry/user-note.php:1.33 Thu Sep 15 14:30:30 2005 +++
> php-master-web/entry/user-note.php Mon Jan 16 12:44:44 2006
> @@ -64,20 +64,20 @@
> if (@mysql_query($query)) {
> $new_id = mysql_insert_id();
> $msg = stripslashes($note);
> - /*
> +
> $msg .= "\n----\n";
> $msg .= "Submitter IP: {$_SERVER['REMOTE_ADDR']}";
> - if ($xFwd = isset($_SERVER['HTTP_X_FORWARDED_FOR']) || $xVia =
> isset($_SERVER['HTTP_VIA'])) { + if
> (isset($_SERVER['HTTP_X_FORWARDED_FOR']) || isset($_SERVER['HTTP_VIA'])) {
> $msg .= " (proxied:";
> - if ($xFwd) {
> + if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
> $msg .= " " . htmlspecialchars($_SERVER['HTTP_X_FORWARDED_FOR']);
> }
> - if ($xVia) {
> + if (isset($_SERVER['HTTP_VIA'])) {
> $msg .= " " . htmlspecialchars($_SERVER['HTTP_VIA']);
> }
> $msg .= ")";
> }
> - */
> +
> $msg .= "\n----\n";
> $msg .= "Manual Page --
> http://www.php.net/manual/en/$sect.php\n";
> $msg .= "Edit --
> ºàß»ß
örÓ‰ê
> ®http://master.php.net/manage/user-notes.php?action=edit+$new_id\n";