obfuscating guestbook entries email addresses

Creating and modifying plugins.
Post Reply
Lesur
Regular
Posts: 10
Joined: Tue Mar 29, 2005 12:07 pm

obfuscating guestbook entries email addresses

Post 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.") ";
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: obfuscating guestbook entries email addresses

Post by garvinhicking »

Yes, the str_replace function is really the best way to go :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Lesur
Regular
Posts: 10
Joined: Tue Mar 29, 2005 12:07 pm

Re: obfuscating guestbook entries email addresses

Post by Lesur »

Ok, thanks.
Post Reply