Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Securing emails with base64_encode() decode()

Status
Not open for further replies.

webdev007

Programmer
Sep 9, 2005
168
I am wondering if by storing in my DB an "encode()" email then do <a href= using decode() am I at least offering some security againt harvester
the reason behind is that I do not want utilizing JS.
and am looking for a solution using PHP
<<<
<?
// coding
$email="henry@whatever.com";
$new_email=(base64_encode($email));
echo"$new_email<p>";
// decoding
$back_to_email=(base64_decode($new_email));
echo"$back_to_email<p>";
?>

>>>

 
Why not pass a link back to the server and have it do the email from there? That way you mask the actual destination address, and you can record a copy in a database for your records (for instance).

There are many ways to do this, but I would suggest presenting a form on the page and letting the user fill it out... then when they submit the form you can insert the appropriate email header details and send. This will guarantee your email address will not be harvested (from your site).

Cheers,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Thanks Jeff,
I will use the DB to store email and other users details
but I do not wish using a form
this is a membership biz directory and they would like using the mail mode they are accustomed to.
Indeed I can use a direct link to the server
but while I was looking for a function in the PHP manual I found the base64() and started to play around with it :)

Henry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top