Current location: Hot Scripts Forums » Programming Languages » ASP » name@domain.com to name at domain dot com


name@domain.com to name at domain dot com

Reply
  #1 (permalink)  
Old 09-26-03, 09: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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 09-27-03, 07:35 AM
Stealth Stealth is offline
1337 pr0gr4mm3r
 
Join Date: Jun 2003
Location: Glasgow, Scotland
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
<% response.write replace(replace("name@domain.com", ".", " dot "), "@", " at ") %>

and back again


<% response.write replace(replace("name@domain.com", " dot ", "."), " at ", "@") %>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 09-27-03, 09:12 AM
s10v8 s10v8 is offline
Newbie Coder
 
Join Date: Aug 2003
Location: Florida
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Stealth
<% response.write replace(replace("name@domain.com", ".", " dot "), "@", " at ") %>

and back again


<% response.write replace(replace("name@domain.com", " dot ", "."), " at ", "@") %>

thanks, i'll send that to him.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to send to all userID of a particular domain. etegration Script Requests 2 11-28-03 06:27 AM
• 100 MB Space + 10 GB Transfer + FREE Domain + PHP, CGI, MySQL & More! = $39.50/yr • HforHosting General Advertisements 0 09-07-03 10:34 PM
Define the domain name is near to expire khibinite The Lounge 0 08-21-03 01:46 PM
8.75$ Domain Name .com , .net & .org aldalil General Advertisements 0 08-04-03 07:35 PM
Restrict a domain or access Gurrutello ASP 3 07-30-03 01:43 PM


All times are GMT -5. The time now is 01:56 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.