Source address in approval e-mail?

Dr. GBooky is here to help you with your guestbook problems ...
Post Reply
factorial8
Posts: 2
Joined: Tue Sep 28, 2010 4:55 pm

Source address in approval e-mail?

Post by factorial8 »

Script URL: http://tideswellmvc.co.uk/gbook/gbook.php
Version of script: 1.7
Hosting company: Zen Internet
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: "IP in approval e-mail"

Write your message below:

When I'm deciding whether to approve an entry in the guest book, it would be useful to know where the entry had come from. The e-mail address can be almost anything, but the IP is harder to spoof.

I changed from a different guest-book script to get the moderation feature, because I was getting several entries a day from someone in Poland with a dynamic IP address and more-or-less random e-mail address. If I knew the IP source of a guest-book entry before approving it I could look it up and check whether it was coming from that same ISP.

Good script, by the way - thanks!
Rgds
Peter
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Re: Source address in approval e-mail?

Post by Klemen »

Open gbook.php in Notepad and just below line

Code: Select all

$message.= "$lang[t19] $url\n";
add

Code: Select all

$message.= "IP: ". $_SERVER['REMOTE_ADDR'] ."\n";
That should do the trick.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
factorial8
Posts: 2
Joined: Tue Sep 28, 2010 4:55 pm

Re: Source address in approval e-mail?

Post by factorial8 »

Klemen wrote:Open gbook.php in Notepad and just below line

Code: Select all

$message.= "$lang[t19] $url\n";
add

Code: Select all

$message.= "IP: ". $_SERVER['REMOTE_ADDR'] ."\n";
That should do the trick.
I'll try it - thanks!

I'd tried something like it but I didn't have the right syntax; I'd have needed a few hours to work out the detailed structure of the code to get to the right answer.

Again, many thanks.
Rgds
Peter
Post Reply