Welcome Guest ( Log In | Register)



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Secure The Email Addresses On Your Website!, Wonderful script and useful! And working
karlo
post Jul 10 2005, 08:21 AM
Post #1


Privileged Member
*********

Group: Members
Posts: 618
Joined: 30-October 04
From: Philippines
Member No.: 2,049



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:

CODE
<?php

/*
    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");
*/

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 "&lt;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> biggrin.gif

This post has been edited by karlo: Feb 8 2008, 06:34 PM
Go to the top of the page
 
+Quote Post
Adamrosso
post Aug 8 2005, 09:31 AM
Post #2


Advanced Member
*******

Group: Members
Posts: 128
Joined: 6-August 05
Member No.: 10,402



Great tutorial. I will use this in the future probaly. anywho, 10/10 =D
Go to the top of the page
 
+Quote Post
crimsoncross
post Dec 24 2005, 02:08 PM
Post #3


Newbie [Level 1]
*

Group: Members
Posts: 10
Joined: 2-September 05
Member No.: 11,434



nice tut
i will use it in future to stop the spam
Go to the top of the page
 
+Quote Post
dLz
post Dec 24 2005, 02:45 PM
Post #4


Newbie [Level 1]
*

Group: Members
Posts: 17
Joined: 23-December 05
Member No.: 16,112



Yeah, very nice!
I will use it! smile.gif
Go to the top of the page
 
+Quote Post
lokesh
post Dec 24 2005, 03:45 PM
Post #5


Newbie [Level 1]
*

Group: Members
Posts: 14
Joined: 24-December 05
Member No.: 16,123



Thats cool script. I'll surely include this script in my upcoming script. Great work there, keep it up smile.gif

BTW, I'm not able to access your sites.
Go to the top of the page
 
+Quote Post
apurva
post Dec 24 2005, 08:25 PM
Post #6


Super Member
*********

Group: Members
Posts: 245
Joined: 11-June 05
From: india-mumbai
Member No.: 8,095



Even i'm not able to access his site..
May be server downtime.
I hate it when its like this..
Go to the top of the page
 
+Quote Post
Florisjuh
post Dec 25 2005, 07:29 AM
Post #7


Proud to be hosted
*********

Group: Members
Posts: 993
Joined: 11-July 04
From: NL
Member No.: 75



Nice tutorial, but I don't think I am gonna need it because I use CMS's which already have email adresses secured smile.gif
Go to the top of the page
 
+Quote Post
Cena_54
post Mar 13 2006, 07:38 AM
Post #8


Newbie [Level 3]
***

Group: Members
Posts: 48
Joined: 12-March 06
Member No.: 19,909



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.
Go to the top of the page
 
+Quote Post
sportytalk
post Mar 13 2006, 05:57 PM
Post #9


Super Member
*********

Group: Members
Posts: 326
Joined: 7-October 05
Member No.: 12,650



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 biggrin.gif