Page 1 of 1

obfuscating guestbook entries email addresses

Posted: Sun Apr 03, 2005 1:41 pm
by Lesur
I am a php novice but wanted to not have the email addresses of the visitors that included them in their guestbook commets on my site visible to every email pulling spambot. Therefore I changed the guestbook plugin to hide the @ symbol as listed below using the str_replace function. Is this a smart way of doing it? It seems there are plenty of php functions to do this so is str_replace the right one for the job in this case?

405a406
> $nsemail=str_replace("@", "(at)", $row['email']);
409c410
< echo "(".TEXT_EMAIL.":".$row['email'].") ";
---
> echo "(".TEXT_EMAIL.":".$nsemail.") ";

Re: obfuscating guestbook entries email addresses

Posted: Sun Apr 03, 2005 7:46 pm
by garvinhicking
Yes, the str_replace function is really the best way to go :)

Regards,
Garvin

Re: obfuscating guestbook entries email addresses

Posted: Sun Apr 03, 2005 9:14 pm
by Lesur
Ok, thanks.