Forum Moderators: coopster

Message Too Old, No Replies

Using base64_encode() and decode()

securing email?

         

henry0

8:03 pm on Oct 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am wondering if by storing in my DB an "encode()" email then do a href= with 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>";
?>

>>>

jatar_k

4:38 pm on Oct 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> am I at least offering some security againt harvester

no

the thing you have to remember is harvesters get data in the same way as a browser and php is server side

view source on the page, if you can read it so can the harvester

henry0

5:08 pm on Oct 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



View source is a GREAT tip
OK so I will create a link pointing to a Header or something that will trigger the mailto:
as such the view source should only show the link to something else
Correct?

jatar_k

5:15 pm on Oct 6, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you can encode emails as well by converting ascii to unicode

so
test@test.com

becomes
&#116;&#101;&#115;&#116;&#64;&#116;&#101;&#115;&#116;&#46;&#99;&#111;&#109;

I do that a lot, it helps, though I am not sure if that works with js, it should. You'll have to give it a go

henry0

5:59 pm on Oct 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am trying to avoid using JS
I need a protection for hundreds of emails
so I won't do it by hand

Is there such a ()
I can create one that will use an array with all codes
but it will require "mucho" typing
Or I can find somewhere such an array well I guess I can look around and steal it from somewhere :)

the more I think about the more I think I have seen one in the manual.

coopster

5:07 pm on Oct 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Why not use js for the email and if the user has it turned off forward them to a "Contact" page with a form or something?