View Single Post
  #1 (permalink)  
Old 09-26-03, 08:52 PM
s10v8 s10v8 is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Florida
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
name@domain.com to name at domain dot com

What I am looking for is how to display a email address from name@domain.com to name at domain dot com. I have done this with PHP but have no knowledge of ASP, I am trying to help a friend out who runs a site with ASP.

Here is the code I use in my PHP script to do this:

$email2 = substr( $email, 0, ( strpos( $email, '@' ) ) ) . ' <b>at</b> ' . substr( $email, ( strpos( $email, '@' ) + 1 ), -( strlen( strrchr( $email , '.' ) ) ) ) . ' <b>dot</b> ' . substr( strrchr( $email , '.' ) , 1 );

echo "<b>Email: </b>$email2<br>";

Any help would be great. Trying to keep spambots from grabbing email addresses from his site.
Reply With Quote