Current location: Hot Scripts Forums » Programming Languages » PHP » hiding email from harvesters


hiding email from harvesters

Reply
  #1 (permalink)  
Old 04-22-04, 05:13 PM
Rainer Rainer is offline
New Member
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hiding email from harvesters

First post so I thought I would make it an interesting one. I was using a javascript to cloak my members email addresses on our members page to hide them from email harvesters. I am currently changing the site over to a php, MySQL site and have run into a problem with this cloaking method. I have been using the following js to cloak the emails:

Email: <SCRIPT LANGUAGE="JavaScript">
user = "username";
site = "domain";
document.write('<a href=\"mailto:' + user + '@' + site + '\">');
document.write(user + '@' + site + '</a>');
</SCRIPT>
The result is:
Email: username@domain

This works great however I can't figure out how to even start to create an effect like this when using data from the database. Is it even possible to cloak an email address with php and MySQL within a string of Print commands?
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 04-22-04, 05:54 PM
Chroder Chroder is offline
Newbie Coder
 
Join Date: Sep 2003
Location: Toronto, Ontario
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
PHP just sends the content so using miltiple print's or echo's won't do a thing. You could try translating the characters into HTML "numbers" (whatta you call em?). Like an @ would turn into &# 64.

PHP Code:

$unsafe 'my@email.com';

$safe '';

for(
$i 0$i strlen($unsafe); $i++)
{
    
$safe .= '&#' ord($unsafe{$i}) . ';';

Should work. Untested though
__________________
DevBox.net | DevBoxForums.com
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
HELP -- Perl email form !! nasos Perl 1 04-08-04 02:21 PM
Can't send email from ASP lordmerlin ASP 1 03-13-04 11:43 PM
Bidflux Blackadder General HotScripts Site Discussion 10 11-08-03 01:49 PM
Form to database to email BogoMips ASP 0 11-03-03 07:12 AM
Preventing email form abuse LunarOrbit Perl 3 10-04-03 10:55 PM


All times are GMT -5. The time now is 10:16 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.