obfuscating guestbook entries email addresses
Posted: Sun Apr 03, 2005 1:41 pm
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.") ";
405a406
> $nsemail=str_replace("@", "(at)", $row['email']);
409c410
< echo "(".TEXT_EMAIL.":".$row['email'].") ";
---
> echo "(".TEXT_EMAIL.":".$nsemail.") ";