Jump to content
xisto Community
Sign in to follow this  
karlo

Secure The Email Addresses On Your Website! Wonderful script and useful And working

Recommended Posts

Just follow the instructions below:


<span style='font-size:8pt;line-height:100%'><span style='color:green'>
/*
Secure Email Function by Juan Karlo Aquino de Guzman
Website: http://www.karlo.ph.tc/ and http://www.abs-cbn.ph.tc/
E-mail: http://www.karlo.ph.tc/send.php

Usage: showEmail("support@microsoft.com",0); OR showEmail("support@microsoft.com",1); <-- example
Types:
0 = ordinary random
1 = more secure random

To include to a script:

include_once("email_secure.php");
*/
</span></span>

And here is the code:
 



<?php/* Secure Email Function by Juan Karlo Aquino de Guzman

Usage: showEmail("support@microsoft.com",0); OR showEmail("support@microsoft.com",1); <-- example Types: 0 = ordinary random 1 = more secure random To include to a script: include_once("email_secure.php");*/function showEmail($email,$type) { if(!strstr($email,"@") || !strstr($email,".")) { echo("<div align=\"center\" style=\"font-family: Verdana; font-size: 12px; font-weight: bold; color: white; background-color: black; padding: 4px;\">Your e-mail is invalid!</div>"); }else { $email_split=split("@",$email); if($type===0) { $random1=str_shuffle(strtolower(metaphone(sha1(mt_rand(11111,99999))))); $random2=str_shuffle(strtolower(metaphone(sha1(mt_rand(11111,99999))))); $randomAT=str_shuffle(str_shuffle($random1).str_shuffle($random2)); }else { $random1=str_shuffle(strtolower(metaphone(uniqid(md5(mt_rand(11111,99999)))))); $random2=str_shuffle(strtolower(metaphone(uniqid(md5(mt_rand(11111,99999)))))); $randomAT=str_shuffle(str_shuffle($random1).str_shuffle($random2)); } $atSign=rawurlencode("@"); $first=rawurlencode($email_split[0]); $second=rawurlencode($email_split[1]); echo "<script language=\"javascript\" type=\"text/javascript\"><!--\nvar $random1=unescape('$first');var $random2=unescape('$second');var $randomAT=unescape('$atSign');document.write($random1+$randomAT+$random2);\n//--></script>"; }}?>

Explaination of the code:



<span style='color:blue'>Basically, what it does is it encrypts the e-mail address and uses JavaScript to show the e-mail address to the visitor of your website. Spambots won't be able to decrypt it.. because it's really secure... you don't have to use ProjectHoneyPot which is a waste of time in my opinion.</span> :unsure:


Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

Wow thanks a lot for this one man, ive been looking for some code as easy as this to put onto my website so those spambots can't get me, I will try and use this code on my website. Thanks a lot.

Share this post


Link to post
Share on other sites

A very nice code and I may even use it myself in future codes if I ever need to display email addresses, although I prefer not to display email addresses (some of the intelligent bots are being coded to read the webpages the exact way that humans do) and I certainly try to avoid using javascript.The simple reason for avoiding javascript is that not all users have javascript enabled browsers (WebTV doesn't support javascript in the first place, and the modern internet browsers such as Mozilla Firefox or Internet Explorer have the option for users to turn it off). A lot of people do have javascript turned off, so basically, I advise staying clear of javascript when at all possible.Nice script nevertheless :(

Share this post


Link to post
Share on other sites

Nice code :(.. but don't think about using this code on my website.. sorry just don't have any ideas for it usage on website.. but great code and there sure are people that see usage of it on theyr websites// but Im not :(.. great job keep it up :(..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.